[Haskell-cafe] [tagsoup] is it the expected behaviour ?

Fernand quarantedeux42 at yahoo.fr
Mon May 19 06:07:00 EDT 2008


Experimenting with tagsoup (I'm using GHC 6.8.2 and tagsoup-0.6), I 
found something which appears to me as strange behaviour : when parsing 
tag's attributes that have spaces enclosing the "=" sign, tagsoup seems 
to interpret these as empty attributes' names and values. For instance 
(notice the spaces enclosing the equal sign) :

$ ghcii.sh -package tagsoup
Loading package tagsoup-0.6 ... linking ... done.
Prelude> :m +Text.HTML.TagSoup
Prelude Text.HTML.TagSoup> parseTags "<a href = \"what\">uh ?</a>"
[TagOpen "a" [("href",""),("","what")],TagText "uh ?",TagClose "a"]

Here, am I wrong when expecting [TagOpen "a" [("href","what")],TagText 
"uh ?",TagClose "a"], or is there some HTML interpretation I don't know 
on the parsing of attributes ?

Sincerely yours,


More information about the Haskell-Cafe mailing list