add some more tags not in the white list
This commit is contained in:
parent
b051155461
commit
eb71e1dd0c
2
test.hs
2
test.hs
@ -1,7 +1,7 @@
|
||||
import Text.HTML.SanitizeXSS
|
||||
|
||||
main = do
|
||||
let test = " <a href='unsafe://hack.com'>anchor</a> <img src='evil://evil.com' /> </foo> <br></br> "
|
||||
let test = " <a href='unsafe://hack.com'>anchor</a> <img src='evil://evil.com' /> <unsafe></foo> <bar /> <br></br> "
|
||||
let actual = (sanitizeXSS test)
|
||||
let expected = " <a>anchor</a> <img /> <br /> "
|
||||
putStrLn $ if actual == expected then "pass" else "failure parsing:" ++ (show test) ++ "\nexpected:" ++ (show expected) ++ "\nactual: " ++ (show actual)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user