Commit fced8b8e authored by jplang's avatar jplang

Add kbd to ALLOWED_TAGS (#25503).

Patch by Jan Schulz-Hofen.

git-svn-id: https://svn.redmine.org/redmine/trunk@16500 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 0609ef80
......@@ -1202,8 +1202,8 @@ class RedCloth3 < String
end
end
ALLOWED_TAGS = %w(redpre pre code notextile)
ALLOWED_TAGS = %w(redpre pre code kbd notextile)
def escape_html_tags(text)
text.gsub!(%r{<(\/?([!\w]+)[^<>\n]*)(>?)}) {|m| ALLOWED_TAGS.include?($2) ? "<#{$1}#{$3}" : "&lt;#{$1}#{'&gt;' unless $3.blank?}" }
end
......
......@@ -166,6 +166,12 @@ EXPECTED
)
end
def test_kbd
assert_html_output({
'<kbd>test</kbd>' => '<kbd>test</kbd>'
}, false)
end
def test_use_of_backslashes_followed_by_numbers_in_headers
assert_html_output({
'h1. 2009\02\09' => '<h1>2009\02\09</h1>'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment