On Wed, Sep 4, 2013 at 8:23 PM, Philip Kent <[email protected]> wrote:

>  Hi Alex,
>
> Thanks for your email.
>
> I'm somewhat confused by what you say. Through investigation, it seems
> html->sxml will decode entities, so long as they aren't within a HTML
> element attribute. Could you clarify on whether that default applies
> globally or just to attributes?
>

Yes, sorry, I misread my own code :)

The default is to _decode_ entities:

#;1> (html->sxml "&quot;")
(*TOP* "\"")

And as you say, it currently doesn't just process attributes:

#;2> (html->sxml "<div data-foo=\"&quot;\">")
(*TOP* (div (@ (data-foo "&quot;"))))

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
_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to