X-Git-Url: http://git.megacz.com/?p=wix.git;a=blobdiff_plain;f=src%2FHtml.lhs;h=6fb939a3b5bdde4c7e1a5833f115c2b9f6111719;hp=295f1315bf8c867f5c5aa3ceea194f0c6fd55038;hb=ee0d619aef56ddd0a03a430a809aa76a1d4fce59;hpb=055780f81a8c53a031898aa18da0145c43f26c1e diff --git a/src/Html.lhs b/src/Html.lhs index 295f131..6fb939a 100644 --- a/src/Html.lhs +++ b/src/Html.lhs @@ -291,18 +291,18 @@ instance ToHtml Text where instance ToHtml String where toHtml s = concatMap htmlEscapeChar s - where - htmlEscapeChar '<' = "<" - htmlEscapeChar '>' = ">" - htmlEscapeChar '&' = "&" - htmlEscapeChar '\'' = "'" - htmlEscapeChar '\"' = """ - htmlEscapeChar c = [c] + +htmlEscapeChar '<' = "<" +htmlEscapeChar '>' = ">" +htmlEscapeChar '&' = "&" +htmlEscapeChar '\'' = "'" +htmlEscapeChar '\"' = """ +htmlEscapeChar c = [c] pre x = "\n
"++ (pre' x) ++ "\n
\n" where pre' (' ':b) = " "++(pre' b) pre' ('\n':b) = "
\n"++(pre' b) - pre' (a:b) = a:(pre' b) + pre' (a:b) = (htmlEscapeChar a)++(pre' b) pre' [] = [] \end{code}