diff --git a/app/assets/javascripts/discourse/lib/markdown.js b/app/assets/javascripts/discourse/lib/markdown.js index a3068fb148d..0fab3033289 100644 --- a/app/assets/javascripts/discourse/lib/markdown.js +++ b/app/assets/javascripts/discourse/lib/markdown.js @@ -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); diff --git a/spec/components/pretty_text_spec.rb b/spec/components/pretty_text_spec.rb index c418a45b760..19b242de442 100644 --- a/spec/components/pretty_text_spec.rb +++ b/spec/components/pretty_text_spec.rb @@ -244,6 +244,8 @@ describe PrettyText do it "sanitizes spans" do PrettyText.cook("a").should match_html "
a
" + PrettyText.cook("a").should match_html "a
" + PrettyText.cook("a").should match_html "a
" end it "bolds stuff in parens" do