unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40794: 26.3; HTML entities ☆ and ★ (inter alia) are not parsed by libxml-parse-html-region
@ 2020-04-23 13:24 Tim Landscheidt
  2020-07-29  5:26 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Landscheidt @ 2020-04-23 13:24 UTC (permalink / raw)
  To: 40794

(Prologue: This bug showed up in the "ALT" attribute of an
"IMG" element of an HTML mail in Gnus.  I am reasonably cer-
tain that this stems from libxml-parse-html-region and
should be fixed there, but there may be more prudent solu-
tions.)

With GNU Emacs 26.3 on Fedora:

| ELISP> (with-temp-buffer
|          (insert "<!DOCTYPE html>
| <html lang=\"en\">
| <head><title>Title</title></head>
| <body>
|   <p>Hello world</p>
|   <p>&auml;</p>
|   <p>&star;</p>
|   <p>&starf;</p>
| </body>
| </html>")
|          (libxml-parse-html-region (point-min) (point-max)))
| (html
|  ((lang . "en"))
|  (head nil
|        (title nil "Title"))
|  (body nil "\n  "
|        (p nil "Hello world")
|        "\n  "
|        (p nil "ä")
|        "\n  "
|        (p nil "&star;")
|        "\n  "
|        (p nil "&starf;")
|        "\n"))

| ELISP>

These should instead yield "ä" (228), "☆" (9734) and
"★" (9733).

lisp/leim/quail/sgml-input.el seems to contain the necessary
data for &star; and &starf; that could probably be fed to
libxml.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-25 10:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23 13:24 bug#40794: 26.3; HTML entities &star; and &starf; (inter alia) are not parsed by libxml-parse-html-region Tim Landscheidt
2020-07-29  5:26 ` Lars Ingebrigtsen
2020-07-29  5:35   ` Lars Ingebrigtsen
2020-09-09 13:22     ` Stefan Kangas
2020-11-25 10:03       ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).