]> git.eshelyaron.com Git - emacs.git/commitdiff
mm-add-meta-html-tag: Improve regexp
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 17 Feb 2017 10:05:56 +0000 (10:05 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 17 Feb 2017 10:05:56 +0000 (10:05 +0000)
* lisp/gnus/mm-decode.el (mm-add-meta-html-tag):
Improve regexp to search html meta tag.

lisp/gnus/mm-decode.el

index 6b53939959625f28467a6035e0d6b8a6f3dc56a8..6683d68a3188b6316953d63c5b6217c423e1d336 100644 (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)))