line break bug in (chibi html-parser)

20 views
Skip to first unread message

*...@speechcode.com

unread,
Jan 11, 2021, 12:30:23 AM1/11/21
to chibi-scheme

Thank you for providing (chibi html-parser), which is quite pleasant to use. Most recently, I've been using it in code to add abstracts to the RSS feed for the Scheme Requests for Implementation (SRFI) home page.

I'd like to report a bug, though: Line breaks after the equal sign after an attribute name but before the value cause an incorrect parse. This is legal HTML, and often happens when automatic wrapping occurs. Here's an example:

linux> chibi-scheme 
> (import (chibi html-parser))
> (import (chibi string))
> (call-with-input-string "<a href=\"http://example.com/\">foo</a>" html->sxml)
(*TOP* (a (@ (href "http://example.com/")) "foo"))
> (call-with-input-string "<a href=\n\"http://example.com/\">foo</a>" html->sxml)
(*TOP* (a (@ (href "") (http:) (example)) ".com/\">foo"))

The first parse above is correct. The second, with the newline after the "=", produces incorrect results.

I've been working around this by rewrapping HTML manually, but I just had to do that for thirty-one SRFI abstracts, which made me realize that I should have reported this earlier. Sorry about that.

In any case, thanks again for an otherwise excellent tool.

Alex Shinn

unread,
Jan 11, 2021, 7:27:28 AM1/11/21
to chibi-...@googlegroups.com

I'll upload a new version to snow-fort later.

--
Alex

--
You received this message because you are subscribed to the Google Groups "chibi-scheme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chibi-scheme...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chibi-scheme/fff438ab-cec6-4468-bdc9-824b8aea8474n%40googlegroups.com.

Arthur A. Gleckler

unread,
Jan 11, 2021, 11:45:52 AM1/11/21
to chibi-scheme
On Mon, Jan 11, 2021 at 4:27 AM Alex Shinn <alex...@gmail.com> wrote:

I'll upload a new version to snow-fort later.
 
Thanks!
Reply all
Reply to author
Forward
0 new messages