Use UTF8 instead of entities in HTML.

Resolves Issue #163.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1744 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2009-12-31 02:06:52 +00:00
parent e620eab478
commit 709de16223
5 changed files with 12 additions and 14 deletions

View file

@ -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

View file

@ -320,7 +320,7 @@
>)=\lim<sub
><em
>h</em
>&#8201;&#8594;&#8201;0</sub
> → 0</sub
>\frac{<em
>f</em
>(<em

View file

@ -25,7 +25,7 @@
>)=\lim<sub
><em
>h</em
>&#8201;&#8594;&#8201;0</sub
> → 0</sub
>\frac{<em
>f</em
>(<em

View file

@ -40,7 +40,7 @@ STUFF INSERTED
>)=\lim<sub
><em
>h</em
>&#8201;&#8594;&#8201;0</sub
> → 0</sub
>\frac{<em
>f</em
>(<em

View file

@ -444,7 +444,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
><p
>Should not be a list item:</p
><p
>M.A.&nbsp;2007</p
>M.A. 2007</p
><p
>B. Williams</p
><hr
@ -783,7 +783,7 @@ Blah
>hello</em
></sup
> a<sup
>hello&nbsp;there</sup
>hello there</sup
>.</p
><p
>Subscripts: H<sub
@ -791,7 +791,7 @@ Blah
>O, H<sub
>23</sub
>O, H<sub
>many&nbsp;of&nbsp;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
>&#8201;&#8712;&#8201;<em
> ∈ <em
>y</em
></span
></li
><li
><span class="math"
>&#945;&#8201;&#8743;&#8201;&#969;</span
>α ∧ ω</span
></li
><li
><span class="math"
@ -867,7 +867,7 @@ Blah
>)=\lim<sub
><em
>h</em
>&#8201;&#8594;&#8201;0</sub
> → 0</sub
>\frac{<em
>f</em
>(<em
@ -884,7 +884,7 @@ Blah
></li
><li
>Here&rsquo;s one that has a line break in it: <span class="math"
>&#945;+&#969;&#8201;×&#8201;<em
>α+ω × <em
>x</em
><sup
>2</sup
@ -930,7 +930,7 @@ Blah
><li
>section: §</li
><li
>set membership: &#8712;</li
>set membership: </li
><li
>copyright: ©</li
></ul