packages feed

xmlhtml 0.1.5.1 → 0.1.5.2

raw patch · 3 files changed

+18/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

src/Text/XmlHtml/HTML/Parse.hs view
@@ -252,10 +252,10 @@ endTag s = do     _ <- text "</"     t <- XML.name-    let tbase = T.toLower $ snd $ T.breakOnEnd ":" t+    let sbase = T.toLower $ snd $ T.breakOnEnd ":" s     r <- if (T.toCaseFold s == T.toCaseFold t)             then return Matched-            else if tbase `S.member` endOmittableLast+            else if sbase `S.member` endOmittableLast                 then return (ImplicitLast t)                 else fail $ "mismatched tags: </" ++ T.unpack t ++                             "> found inside <" ++ T.unpack s ++ "> tag"
test/suite/Text/XmlHtml/Tests.hs view
@@ -383,7 +383,9 @@     testIt   "omitEndTR              " omitEndTR,     testIt   "omitEndTD              " omitEndTD,     testIt   "omitEndTH              " omitEndTH,-    testIt   "testNewRefs            " testNewRefs+    testIt   "testNewRefs            " testNewRefs,+    testIt   "errorImplicitClose     " errorImplicitClose,+    testIt   "weirdScriptThing       " weirdScriptThing     ]  caseInsDoctype1 :: Bool@@ -522,6 +524,18 @@ testNewRefs   = parseHTML "" "&CenterDot;&doublebarwedge;&fjlig;"     == Right (HtmlDocument UTF8 Nothing [TextNode "\x000B7\x02306\&fj"]) +errorImplicitClose :: Bool+errorImplicitClose = isLeft $ parseHTML "" "<p><pre>foo</pre></p>"++weirdScriptThing :: Bool+weirdScriptThing = parseHTML "" "<div><script type=\"text/javascript\">selector.append('<option>'+name+'</option>');</script></div>"+    == Right (HtmlDocument UTF8 Nothing [+        Element "div" [] [+            Element "script" [("type", "text/javascript")] [+                TextNode "selector.append('<option>'+name+'</option>');"+                ]+            ]+        ])  ------------------------------------------------------------------------------ -- XML Rendering Tests -------------------------------------------------------
xmlhtml.cabal view
@@ -1,5 +1,5 @@ Name:                xmlhtml-Version:             0.1.5.1+Version:             0.1.5.2 Synopsis:            XML parser and renderer with HTML 5 quirks mode Description:         Contains renderers and parsers for both XML and HTML 5                      document fragments, which share data structures wo that