@@ -13,6 +13,7 @@ examples :: [(Bool, BS.ByteString)]
14 [(True, "<test id='bob'>here<extra/>there</test>")
14 [(True, "<test id='bob'>here<extra/>there</test>")
15 ,(True, "<test /><close />")
15 ,(True, "<test /><close />")
16+ ,(True, "<test /><!-- comment > --><close />")
16 ,(True, "<test id=\"bob value\" another-attr=\"test with <\">here </test> more text at the end<close />")
17 ,(True, "<test id=\"bob value\" another-attr=\"test with <\">here </test> more text at the end<close />")
17 ,(False, "<test></more>")
18 ,(False, "<test></more>")
18 ,(False, "<test")
19 ,(False, "<test")
@@ -58,5 +59,5 @@ rerender = inside
58 | otherwise = error "Invalid name"
59 | otherwise = error "Invalid name"
59 validAttr x | BS.notElem '\"' x = x
60 validAttr x | BS.notElem '\"' x = x
60 | otherwise = error "Invalid attribute"
61 | otherwise = error "Invalid attribute"
61− validStr x | BS.notElem '<' x = x
62+ validStr x | BS.notElem '<' x || BS.isInfixOf "<!--" x = x
62 | otherwise = error $ show ("Invalid string", x)
63 | otherwise = error $ show ("Invalid string", x)