module HTMLEnt where htmlEntityEncode :: String -> String htmlEntityEncode s = foldr (++) [] (map htmlEntChar s) htmlEntChar :: Char -> String htmlEntChar '<' = "<" htmlEntChar '>' = ">" htmlEntChar '&' = "&" htmlEntChar c = [c]