X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FHtml.hs;h=01004cf556b01f3dde21fd8b9585b82732c5b009;hb=eed0d7b0f8ef28864c00925beef5c8853bcd44cc;hp=2f9332522292d34bbed8f7d4abc8d8a890e09ea8;hpb=4cc476a2714260980899ca5358196bbf5226b3c2;p=dead%2Fhalcyon.git diff --git a/src/Html.hs b/src/Html.hs index 2f93325..01004cf 100644 --- a/src/Html.hs +++ b/src/Html.hs @@ -1,4 +1,7 @@ -module Html +module Html ( + html_tests, + replace_entities + ) where import Test.Framework (Test, testGroup) @@ -11,7 +14,7 @@ replace_entities [] = [] replace_entities ('&':xs) = let (b, a) = break (== ';') xs in case (lookupEntity b, a) of - (Just c, ';':as) -> c : replace_entities as + (Just s, ';':as) -> s ++ replace_entities as _ -> '&' : replace_entities xs replace_entities (x:xs) = x : replace_entities xs