summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-15 11:00:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-06-15 11:00:40 +0000
commit11e9891425c4fb59ebeb7080077c1097d3800f8c (patch)
tree483492b396acb21cd166a27a4cfa87caad08c33a /lib
parent8b2105e20ac76dba21cd8e313a75a5d52850cf69 (diff)
downloadredmine-11e9891425c4fb59ebeb7080077c1097d3800f8c.tar.gz
redmine-11e9891425c4fb59ebeb7080077c1097d3800f8c.zip
Fixed: TOC does not remove colorization markups (#1423).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1542 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/wiki_formatting.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb
index 7197af2c3..88a858b04 100644
--- a/lib/redmine/wiki_formatting.rb
+++ b/lib/redmine/wiki_formatting.rb
@@ -85,6 +85,9 @@ module Redmine
@toc.each_with_index do |heading, index|
# remove wiki links from the item
toc_item = heading.last.gsub(/(\[\[|\]\])/, '')
+ # remove styles
+ # eg. %{color:red}Triggers% => Triggers
+ toc_item.gsub! %r[%\{[^\}]*\}([^%]+)%], '\\1'
out << "<a href=\"##{index+1}\" class=\"heading#{heading.first}\">#{toc_item}</a>"
end
out << '</div>'