diff options
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 4 | ||||
-rw-r--r-- | tests/s5.basic.html | 2 | ||||
-rw-r--r-- | tests/s5.fragment.html | 2 | ||||
-rw-r--r-- | tests/s5.inserts.html | 2 | ||||
-rw-r--r-- | tests/writer.html | 16 |
5 files changed, 12 insertions, 14 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index cb8bd35d3..9a093ad96 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -70,9 +70,7 @@ stringToHtml = primHtml . concatMap fixChar fixChar '>' = ">" fixChar '&' = "&" fixChar '"' = """ - fixChar '\160' = " " - fixChar c | ord c < 0xff = [c] - fixChar c = "&#" ++ show (ord c) ++ ";" + fixChar c = [c] -- | Convert Pandoc document to Html string. writeHtmlString :: WriterOptions -> Pandoc -> String diff --git a/tests/s5.basic.html b/tests/s5.basic.html index 4f49e3a57..253bcab2f 100644 --- a/tests/s5.basic.html +++ b/tests/s5.basic.html @@ -320,7 +320,7 @@ >)=\lim<sub ><em >h</em - > → 0</sub + > → 0</sub >\frac{<em >f</em >(<em diff --git a/tests/s5.fragment.html b/tests/s5.fragment.html index 1d58e154a..6ab704d41 100644 --- a/tests/s5.fragment.html +++ b/tests/s5.fragment.html @@ -25,7 +25,7 @@ >)=\lim<sub ><em >h</em - > → 0</sub + > → 0</sub >\frac{<em >f</em >(<em diff --git a/tests/s5.inserts.html b/tests/s5.inserts.html index c8704871d..c223f0f45 100644 --- a/tests/s5.inserts.html +++ b/tests/s5.inserts.html @@ -40,7 +40,7 @@ STUFF INSERTED >)=\lim<sub ><em >h</em - > → 0</sub + > → 0</sub >\frac{<em >f</em >(<em diff --git a/tests/writer.html b/tests/writer.html index 9ddf5c70c..c67cfbd42 100644 --- a/tests/writer.html +++ b/tests/writer.html @@ -444,7 +444,7 @@ These should not be escaped: \$ \\ \> \[ \{ ><p >Should not be a list item:</p ><p - >M.A. 2007</p + >M.A. 2007</p ><p >B. Williams</p ><hr @@ -783,7 +783,7 @@ Blah >hello</em ></sup > a<sup - >hello there</sup + >hello there</sup >.</p ><p >Subscripts: H<sub @@ -791,7 +791,7 @@ Blah >O, H<sub >23</sub >O, H<sub - >many of them</sub + >many of them</sub >O.</p ><p >These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</p @@ -836,13 +836,13 @@ Blah ><span class="math" ><em >x</em - > ∈ <em + > ∈ <em >y</em ></span ></li ><li ><span class="math" - >α ∧ ω</span + >α ∧ ω</span ></li ><li ><span class="math" @@ -867,7 +867,7 @@ Blah >)=\lim<sub ><em >h</em - > → 0</sub + > → 0</sub >\frac{<em >f</em >(<em @@ -884,7 +884,7 @@ Blah ></li ><li >Here’s one that has a line break in it: <span class="math" - >α+ω × <em + >α+ω × <em >x</em ><sup >2</sup @@ -930,7 +930,7 @@ Blah ><li >section: §</li ><li - >set membership: ∈</li + >set membership: ∈</li ><li >copyright: ©</li ></ul |