|
From: | Philip Kent |
Subject: | Re: [Chicken-users] html->sxml (html-parser egg) does not decode entities in html attributes, ideas why? |
Date: | Wed, 4 Sep 2013 15:39:56 +0000 |
Hi Alex,
Excellent! Thanks for looking into it and for the tip re custom parsers - I was trying to understand that code!
Philip
From: Alex Shinn <address@hidden>
Sent: 04 September 2013 14:00 To: Philip Kent Cc: address@hidden Subject: Re: [Chicken-users] html->sxml (html-parser egg) does not decode entities in html attributes, ideas why? On Wed, Sep 4, 2013 at 8:23 PM, Philip Kent <address@hidden> wrote:
Yes, sorry, I misread my own code :)
The default is to _decode_ entities:
#;1> (html->sxml """)
(*TOP* "\"")
And as you say, it currently doesn't just process attributes:
#;2> (html->sxml "<div data-foo=\""\">")
(*TOP* (div (@ (data-foo """))))
I'll fix this.
What I was referring to before is that you can customize
what is done with entities with
(make-html-parser 'entity: (lambda (name) ...))
and can customize non-default entity names:
(make-html-parser 'entities: '(("quot" . "\"") ...))
but again, these are currently ignored in attributes.
--
Alex
|
[Prev in Thread] | Current Thread | [Next in Thread] |