Revision 818:6973eeea55ac vendor/plugins/redmine_tags
| vendor/plugins/redmine_tags/assets/javascripts/tags_input.js | ||
|---|---|---|
| 86 | 86 |
addTagsList: function(tags_list) {
|
| 87 | 87 |
var tags = tags_list.split(',');
|
| 88 | 88 |
for (var i = 0; i < tags.length; i++) {
|
| 89 |
this.addTag(tags[i].strip().toLowerCase()); |
|
| 89 |
this.addTag(tags[i].strip().stripTags().toLowerCase());
|
|
| 90 | 90 |
} |
| 91 | 91 |
}, |
| 92 | 92 |
|
| vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb | ||
|---|---|---|
| 10 | 10 |
skip_before_filter :authorize, :only => [:set_fieldset_status] |
| 11 | 11 |
skip_before_filter :find_project, :only => [:set_fieldset_status] |
| 12 | 12 |
before_filter :add_tags_to_project, :only => [:save, :update] |
| 13 |
# before_filter :filter_projects, :only => :index |
|
| 14 | 13 |
|
| 15 | 14 |
alias :index filtered_index |
| 16 | 15 |
end |
| 17 | 16 |
end |
| 18 | 17 |
|
| 19 | 18 |
module InstanceMethods |
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 19 |
|
|
| 23 | 20 |
def add_tags_to_project |
| 24 | 21 |
|
| 25 | 22 |
if params && params[:project] && !params[:project][:tag_list].nil? |
| ... | ... | |
| 27 | 24 |
new_tags = params[:project][:tag_list].to_s.downcase |
| 28 | 25 |
|
| 29 | 26 |
unless (old_tags == new_tags) |
| 30 |
@project.tag_list = new_tags
|
|
| 27 |
@project.tag_list = ActionController::Base.helpers.strip_tags(new_tags)
|
|
| 31 | 28 |
end |
| 32 | 29 |
end |
| 33 | 30 |
end |
Also available in: Unified diff