1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

mm-add-meta-html-tag: Improve regexp

* lisp/gnus/mm-decode.el (mm-add-meta-html-tag):
Improve regexp to search html meta tag.
This commit is contained in:
Katsumi Yamaoka 2017-02-17 10:05:56 +00:00
parent 79f017d5c3
commit 630e2d2e6a

View File

@ -1413,8 +1413,8 @@ Return t if meta tag is added or replaced."
(let ((case-fold-search t))
(goto-char (point-min))
(if (re-search-forward "\
<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']\
text/\\(\\sw+\\)\\(?:;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t)
<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']?\
text/\\(\\sw+\\)\\(?:;\\s-*charset=\\([^\t\n\r \"'>]+\\)\\)?[^>]*>" nil t)
(if (and (not force-charset)
(match-beginning 2)
(string-match "\\`html\\'" (match-string 1)))