FIX: compensate for typographer

typographer can change " to ” leading to breakages in parser

At least codify this. Longer term we want to re-prioritize typographer so
it always runs after bbcode parsing.
This commit is contained in:
Sam Saffron
2020-09-21 09:44:37 +10:00
parent a91ee45de9
commit cba5baa427
2 changed files with 8 additions and 5 deletions

View File

@ -1711,17 +1711,20 @@ HTML
end
it "wraps the [wrap] tag in block" do
# can interfere with parsing
SiteSetting.enable_markdown_typographer = true
md = <<~MD
[wrap=toc]
taco
[wrap=toc id="a” aa='b"' bb="f'"]
taco1
[/wrap]
MD
cooked = PrettyText.cook(md)
html = <<~HTML
<div class="d-wrap" data-wrap="toc">
<p>taco</p>
<div class="d-wrap" data-wrap="toc" data-id="a" data-aa="b&amp;quot;" data-bb="f'">
<p>taco1</p>
</div>
HTML