Subject: Re: bug#24831: shr mangling messages

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 04 Nov 2016 12:17:18 +0100

Katsumi Yamaoka <[email-masked]> writes:

> I found it in some mails from amazon.co.jp, but not so many and
> not so annoying.  Here it is:
>
> <html>
> ...
> </html>             --MuLtIpArT_BoUnDaRy--

Oh, right...

> Well, is this a reasonable operation?
>
> (with-temp-buffer
>   (insert "<html><body>Foo</body></html>Bar")
>   (libxml-parse-html-region (point-min) (point-max)))
>  => (html nil (body nil "Foo") (html nil (p nil "Bar")))

Yes, it's two <html> elements after each other.  In HTML, the <html>
start (and end) tags are optional.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no