diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-25 00:00:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-25 00:00:58 +0000 |
commit | 30282f20daecb539b9fbc5659310e1810965dd20 (patch) | |
tree | a912653e16296b9f3676cda0ce0a7d57e0719417 /app | |
parent | 7ad40e22feb89428621f41a4113d049ac2692950 (diff) | |
download | redmine-30282f20daecb539b9fbc5659310e1810965dd20.tar.gz redmine-30282f20daecb539b9fbc5659310e1810965dd20.zip |
Fixed escaping issues in #textilizable with Rails 3.1.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8985 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9dbc41c10..8d08e9d5b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -306,7 +306,7 @@ module ApplicationHelper def principals_options_for_select(collection, selected=nil) s = '' if collection.include?(User.current) - s << content_tag('option', "<< #{l(:label_me)} >>", :value => User.current.id) + s << content_tag('option', "<< #{l(:label_me)} >>".html_safe, :value => User.current.id) end groups = '' collection.sort.each do |element| @@ -547,7 +547,7 @@ module ApplicationHelper while tag = tags.pop parsed << "</#{tag}>" end - parsed.html_safe + parsed end def parse_inline_attachments(text, project, obj, attr, only_path, options) @@ -564,9 +564,9 @@ module ApplicationHelper if !desc.blank? && alttext.blank? alt = " title=\"#{desc}\" alt=\"#{desc}\"" end - "src=\"#{image_url}\"#{alt}".html_safe + "src=\"#{image_url}\"#{alt}" else - m.html_safe + m end end end @@ -618,10 +618,10 @@ module ApplicationHelper link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new'))) else # project or wiki doesn't exist - all.html_safe + all end else - all.html_safe + all end end end @@ -786,7 +786,7 @@ module ApplicationHelper end end end - (leading + (link || "#{project_prefix}#{prefix}#{repo_prefix}#{sep}#{identifier}#{comment_suffix}")).html_safe + (leading + (link || "#{project_prefix}#{prefix}#{repo_prefix}#{sep}#{identifier}#{comment_suffix}")) end end @@ -795,14 +795,15 @@ module ApplicationHelper def parse_sections(text, project, obj, attr, only_path, options) return unless options[:edit_section_links] text.gsub!(HEADING_RE) do + heading = $1 @current_section += 1 if @current_section > 1 content_tag('div', link_to(image_tag('edit.png'), options[:edit_section_links].merge(:section => @current_section)), :class => 'contextual', - :title => l(:button_edit_section)) + $1 + :title => l(:button_edit_section)) + heading.html_safe else - $1 + heading end end end |