Fix: whitelist regex for bbcode too wide
This commit is contained in:
parent
a52c80e2a8
commit
9828a268b9
|
@ -258,6 +258,6 @@ Discourse.Markdown.whiteListTag('span', 'bbcode-i');
|
|||
Discourse.Markdown.whiteListTag('span', 'bbcode-u');
|
||||
Discourse.Markdown.whiteListTag('span', 'bbcode-s');
|
||||
|
||||
Discourse.Markdown.whiteListTag('span', 'class', /bbcode-size-\d+/);
|
||||
Discourse.Markdown.whiteListTag('span', 'class', /bbcode-size-\d+$/);
|
||||
|
||||
Discourse.Markdown.whiteListIframe(/^(https?:)?\/\/www\.google\.com\/maps\/embed\?.+/i);
|
||||
|
|
|
@ -240,8 +240,12 @@ describe PrettyText do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
describe "markdown quirks" do
|
||||
|
||||
it "sanitizes spans" do
|
||||
PrettyText.cook("<span class=\"-bbcode-size-0 fa fa-spin\">a</span>").should match_html "<p><span>a</span></p>"
|
||||
end
|
||||
|
||||
it "bolds stuff in parens" do
|
||||
PrettyText.cook("a \"**hello**\"").should match_html "<p>a "<strong>hello</strong>"</p>"
|
||||
PrettyText.cook("(**hello**)").should match_html "<p>(<strong>hello</strong>)</p>"
|
||||
|
|
Loading…
Reference in New Issue