chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] html->sxml (html-parser egg) does not decode entitie


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 11:23:20 +0000

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?

Thanks,
Philip


From: Alex Shinn <address@hidden>
Sent: 04 September 2013 03:51
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 Tue, Sep 3, 2013 at 11:19 PM, Philip Kent <address@hidden> wrote:
Hi all,

I noticed an issue today with the html-parser egg, where it does not seem to decode entities within an attribute of an element, I have included an example below.

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

Expected:
(*TOP* (div (@ (data-foo "\""))))

I was wondering if anyone could provide some thoughts as to why this might be happening? I have taken a look at the html-parser egg but have not seen much (but then this goes far beyond my knowledge of scheme!)

html-parser processes entities, but the default for html->sxml
is just to leave the encoded as-is.  I'm not sure if that's the best
default, but will at least provide a convenient option to get
the decoded strings.

-- 
Alex


reply via email to

[Prev in Thread] Current Thread [Next in Thread]