From 705b84b75bb86139f5c2122620a6bb063eff4313 Mon Sep 17 00:00:00 2001 From: Greg Weber Date: Fri, 24 Sep 2010 12:15:12 -0700 Subject: [PATCH] turn tagPosition off - test passes --- Text/HTML/SanitizeXSS.hs | 2 +- test.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Text/HTML/SanitizeXSS.hs b/Text/HTML/SanitizeXSS.hs index 81326ad..9a75615 100644 --- a/Text/HTML/SanitizeXSS.hs +++ b/Text/HTML/SanitizeXSS.hs @@ -14,7 +14,7 @@ import Text.HTML.TagSoup sanitizeXSS :: String -> String sanitizeXSS = renderTagsOptions renderOptions { optMinimize = \x -> x `elem` ["br","img"] - } . safeTags . parseTagsOptions parseOptions { optTagPosition = True } + } . safeTags . parseTags -- Options parseOptions { optTagPosition = True } where safeTags :: [Tag String] -> [Tag String] safeTags [] = [] diff --git a/test.hs b/test.hs index cc35a13..6e82a99 100644 --- a/test.hs +++ b/test.hs @@ -3,5 +3,5 @@ import Text.HTML.SanitizeXSS main = do let test = " anchor

" let actual = (sanitizeXSS test) - let expected = " anchor
" + let expected = " anchor
" putStrLn $ if actual == expected then "pass" else "failure parsing:" ++ (show test) ++ "\nexpected:" ++ (show expected) ++ "\nactual: " ++ (show actual)