GNU bug report logs - #38363
Error in mhtml-syntax-propertize in HTML with inline script

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Richard Copley <rcopley@HIDDEN>; merged with #38372; dated Mon, 25 Nov 2019 21:33:36 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 38363 38372. Request was from Richard Copley <rcopley@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Nov 2019 12:56:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 25 07:56:02 2019
Received: from localhost ([127.0.0.1]:47827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iZDuL-0005Sw-Kt
	for submit <at> debbugs.gnu.org; Mon, 25 Nov 2019 07:56:02 -0500
Received: from lists.gnu.org ([209.51.188.17]:49370)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rcopley@HIDDEN>) id 1iZDqd-0005JQ-Lj
 for submit <at> debbugs.gnu.org; Mon, 25 Nov 2019 07:52:12 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:41726)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <rcopley@HIDDEN>) id 1iYrPi-0003bH-4h
 for bug-gnu-emacs@HIDDEN; Sun, 24 Nov 2019 07:54:55 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rcopley@HIDDEN>) id 1iYrPg-0004Tl-Dt
 for bug-gnu-emacs@HIDDEN; Sun, 24 Nov 2019 07:54:54 -0500
Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:32905)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <rcopley@HIDDEN>) id 1iYrPg-0004TL-8V
 for bug-gnu-emacs@HIDDEN; Sun, 24 Nov 2019 07:54:52 -0500
Received: by mail-ot1-x332.google.com with SMTP id q23so4379162otn.0
 for <bug-gnu-emacs@HIDDEN>; Sun, 24 Nov 2019 04:54:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=vmz0XsZWIXkFThoeIBrImt6exeWNdEroja5wMZw8vQ4=;
 b=P8StpCsTej8Mwy+iMtWTZKz4xNf4K0owOAUe3weKx95qdFN57oGLyJEtMq18W1/RdJ
 WV1FVsN2RvZnHHuZF2meXye7xvdDImGP/vRKh4g99R5xoVPjiPEaPMT9bg38s6w22pcn
 8Im3zC26Qi/VaLlyAwcLocw+BRAJFvgSvawa9z8rr35VcFI23gggBDGayoal/j2Uk1BN
 nPZs+42Aql0ohvL0usNUQZBp517s/NkKsGrm7y13q0Yyk1esyN0bpsX/npcomM5fWwGb
 wKXclAl+C2NOgDv/2WdvJ/LHk8jCIL8sjT1/z8PEOAWB/FxYvnwz+cW+7q7+EJc1ymSp
 UUVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=vmz0XsZWIXkFThoeIBrImt6exeWNdEroja5wMZw8vQ4=;
 b=ibGD5G4v4ge8i8Wk5g9JR+zxg4t3GlDEAkcYPiTzz5EXzSYb2LJWzPFbJxv+jnfLOk
 BtbI9G2PPYJSJUVOHd2YGKyAL2OlEZSv6u+vTiY1xYL6Bsg9qJ1+eXEHucDhfM3ZW0D3
 mktDAmmzKhWsfBAiEn6hQR23fAgDL/RC6JELgBaqpwTOJg6tIqiXmOdc1lnJhwRqx5Ij
 Hj+fk4L6zGp3qamMxuw9khhzgKjWOYDlbhAHqjk0q0gsYB03uS2MM+eCGI/rW6wM1Wuk
 MyQCDWCygwmQwOqtRnPN7JwFi2tdUUP5tdNPu0wUyxPBikSkbh38nn6bsDYdZxiUNRb3
 CVkw==
X-Gm-Message-State: APjAAAXUXAB5r9cAnPEdjKkZPShvG1Esn35NRo7N/DuQUn4KL98qDbNs
 JnfEN3NtfTl7DkSFLcK7CrVD2/XbV7yH4+RG8sBEv1Q4o74=
X-Google-Smtp-Source: APXvYqz5u1FcNI3WuZ7Ivva0t46Pcw90l/HkRN2Mln4wymsNgG29WDtlrEIUeY/qyEfZTGQ7s3jALlikf69VYfxRmEI=
X-Received: by 2002:a9d:2d89:: with SMTP id g9mr16384705otb.126.1574600090288; 
 Sun, 24 Nov 2019 04:54:50 -0800 (PST)
MIME-Version: 1.0
From: Richard Copley <rcopley@HIDDEN>
Date: Sun, 24 Nov 2019 12:54:24 +0000
Message-ID: <CAPM58ojiLM4sO3X_LNwKxOZvWoVqfY0256mtCuPVE7qKyhsQLA@HIDDEN>
Subject: Error in mhtml-syntax-propertize in HTML with inline script
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="0000000000000b8600059817277b"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::332
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--0000000000000b8600059817277b
Content-Type: text/plain; charset="UTF-8"

HTML with inline script can cause an error in mhtml-syntax-propertize.

Recipe from emacs -Q: Visit a new file "index.html" and insert these
contents:

<html>
  <head>
    <script> 0 </script>
  </head>
  <body>
    it's
  </body>
</html>

Put the cursor after the zero and type a semicolon. An error is signalled.

(Note the "unmatched" apostrophe in the HTML body.)

Errors:
Error during redisplay: (jit-lock-function 1) signaled (wrong-type-argument
number-or-marker-p nil)
mhtml-syntax-propertize: Wrong type argument: number-or-marker-p, nil

Backtrace:
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  sgml--syntax-propertize-ppss(86)
  mhtml-syntax-propertize(33 107)
  syntax-propertize(50)
  syntax-ppss()
  electric-indent-post-self-insert-function()
  self-insert-command(1 59)
  funcall-interactively(self-insert-command 1 59)
  call-interactively(self-insert-command nil nil)
  command-execute(self-insert-command)

In GNU Emacs 27.0.50 (build 6, x86_64-w64-mingw32)
 of 2019-11-24 built on MACHINE
Repository revision: 5a3e96b17c2a948ac952295962dc6e281ec5cad5
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19025
System Description: Microsoft Windows 10 Pro (v10.0.1903.19025.1051)

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
Mark set
Error during redisplay: (jit-lock-function 1) signaled (wrong-type-argument
number-or-marker-p nil)
mhtml-syntax-propertize: Wrong type argument: number-or-marker-p, nil
Configured using:
 'configure --config-cache --with-modules --without-pop --without-dbus
 --without-gconf --without-gsettings CFLAGS=-O2'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY W32NOTIFY ACL GNUTLS LIBXML2
HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES THREADS JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: HTML+JS

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc dired dired-loaddefs rfc822
mml mml-sec epa derived epg epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail vc-git
diff-mode easy-mmode mhtml-mode css-mode smie eww mm-url gnus nnheader
gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums time-date
mail-utils wid-edit mm-util mail-prsvr thingatpt url-queue url url-proxy
url-privacy url-expand url-methods url-history mailcap shr
text-property-search url-cookie url-domsuf url-util url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars puny svg xml browse-url format-spec color js
json subr-x map imenu cc-mode cc-fonts easymenu cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode seq
byte-opt gv bytecomp byte-compile cconv dom cl-loaddefs cl-lib tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads w32notify w32 lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 113316 8380)
 (symbols 48 13210 1)
 (strings 32 40080 2328)
 (string-bytes 1 1310957)
 (vectors 16 18724)
 (vector-slots 8 235664 6880)
 (floats 8 204 73)
 (intervals 56 264 0)
 (buffers 1000 12))

--0000000000000b8600059817277b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>HTML with inline script can cause an error in mhtml-s=
yntax-propertize.</div><div><br></div><div>Recipe from emacs -Q: Visit a ne=
w file &quot;index.html&quot; and insert these contents:</div><div><br></di=
v>&lt;html&gt;<br>=C2=A0 &lt;head&gt;<br>=C2=A0 =C2=A0 &lt;script&gt; 0 &lt=
;/script&gt;<br>=C2=A0 &lt;/head&gt;<br>=C2=A0 &lt;body&gt;<br>=C2=A0 =C2=
=A0 it&#39;s<br>=C2=A0 &lt;/body&gt;<br>&lt;/html&gt;<br><div><br></div><di=
v> Put the cursor after the zero and type a semicolon. An error is signalle=
d.</div><div><br></div><div>(Note the &quot;unmatched&quot; apostrophe in t=
he HTML body.)</div><br>Errors:<br>Error during redisplay: (jit-lock-functi=
on 1) signaled (wrong-type-argument number-or-marker-p nil)<br>mhtml-syntax=
-propertize: Wrong type argument: number-or-marker-p, nil<br><br>Backtrace:=
<br>Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p n=
il)<br>=C2=A0 sgml--syntax-propertize-ppss(86)<br>=C2=A0 mhtml-syntax-prope=
rtize(33 107)<br>=C2=A0 syntax-propertize(50)<br>=C2=A0 syntax-ppss()<br>=
=C2=A0 electric-indent-post-self-insert-function()<br>=C2=A0 self-insert-co=
mmand(1 59)<br>=C2=A0 funcall-interactively(self-insert-command 1 59)<br>=
=C2=A0 call-interactively(self-insert-command nil nil)<br>=C2=A0 command-ex=
ecute(self-insert-command)<br><br>In GNU Emacs 27.0.50 (build 6, x86_64-w64=
-mingw32)<br>=C2=A0of 2019-11-24 built on MACHINE<br>Repository revision: 5=
a3e96b17c2a948ac952295962dc6e281ec5cad5<br>Repository branch: master<br>Win=
dowing system distributor &#39;Microsoft Corp.&#39;, version 10.0.19025<br>=
System Description: Microsoft Windows 10 Pro (v10.0.1903.19025.1051)<br><br=
>Recent messages:<br>For information about GNU Emacs and the GNU system, ty=
pe C-h C-a.<br>(New file)<br>Mark set<br>Error during redisplay: (jit-lock-=
function 1) signaled (wrong-type-argument number-or-marker-p nil)<br>mhtml-=
syntax-propertize: Wrong type argument: number-or-marker-p, nil<br>Configur=
ed using:<br>=C2=A0&#39;configure --config-cache --with-modules --without-p=
op --without-dbus<br>=C2=A0--without-gconf --without-gsettings CFLAGS=3D-O2=
&#39;<br><br>Configured features:<br>XPM JPEG TIFF GIF PNG RSVG SOUND NOTIF=
Y W32NOTIFY ACL GNUTLS LIBXML2<br>HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS MODULES=
 THREADS JSON PDUMPER LCMS2 GMP<br><br>Important settings:<br>=C2=A0 value =
of $LANG: ENG<br>=C2=A0 locale-coding-system: cp1252<br><br>Major mode: HTM=
L+JS<br><br>Minor modes in effect:<br>=C2=A0 tooltip-mode: t<br>=C2=A0 glob=
al-eldoc-mode: t<br>=C2=A0 electric-indent-mode: t<br>=C2=A0 mouse-wheel-mo=
de: t<br>=C2=A0 tool-bar-mode: t<br>=C2=A0 menu-bar-mode: t<br>=C2=A0 file-=
name-shadow-mode: t<br>=C2=A0 global-font-lock-mode: t<br>=C2=A0 font-lock-=
mode: t<br>=C2=A0 blink-cursor-mode: t<br>=C2=A0 auto-composition-mode: t<b=
r>=C2=A0 auto-encryption-mode: t<br>=C2=A0 auto-compression-mode: t<br>=C2=
=A0 line-number-mode: t<br>=C2=A0 transient-mark-mode: t<br><br>Load-path s=
hadows:<br>None found.<br><br>Features:<br>(shadow sort mail-extr emacsbug =
message rmc dired dired-loaddefs rfc822<br>mml mml-sec epa derived epg epg-=
config mm-decode mm-bodies mm-encode<br>mail-parse rfc2231 mailabbrev gmm-u=
tils mailheader sendmail vc-git<br>diff-mode easy-mmode mhtml-mode css-mode=
 smie eww mm-url gnus nnheader<br>gnus-util rmail rmail-loaddefs rfc2047 rf=
c2045 ietf-drums time-date<br>mail-utils wid-edit mm-util mail-prsvr thinga=
tpt url-queue url url-proxy<br>url-privacy url-expand url-methods url-histo=
ry mailcap shr<br>text-property-search url-cookie url-domsuf url-util url-p=
arse<br>auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs<br>passw=
ord-cache url-vars puny svg xml browse-url format-spec color js<br>json sub=
r-x map imenu cc-mode cc-fonts easymenu cc-guess cc-menus<br>cc-cmds cc-sty=
les cc-align cc-engine cc-vars cc-defs sgml-mode seq<br>byte-opt gv bytecom=
p byte-compile cconv dom cl-loaddefs cl-lib tooltip<br>eldoc electric uniqu=
ify ediff-hook vc-hooks lisp-float-type mwheel<br>dos-w32 ls-lisp disp-tabl=
e term/w32-win w32-win w32-vars term/common-win<br>tool-bar dnd fontset ima=
ge regexp-opt fringe tabulated-list replace<br>newcomment text-mode elisp-m=
ode lisp-mode prog-mode register page<br>tab-bar menu-bar rfn-eshadow isear=
ch timer select scroll-bar mouse<br>jit-lock font-lock syntax facemenu font=
-core term/tty-colors frame<br>minibuffer cl-generic cham georgian utf-8-la=
ng misc-lang vietnamese<br>tibetan thai tai-viet lao korean japanese eucjp-=
ms cp51932 hebrew greek<br>romanian slovak czech european ethiopic indian c=
yrillic chinese<br>composite charscript charprop case-table epa-hook jka-cm=
pr-hook help<br>simple abbrev obarray cl-preloaded nadvice loaddefs button =
faces<br>cus-face macroexp files text-properties overlay sha1 md5 base64 fo=
rmat<br>env code-pages mule custom widget hashtable-print-readable backquot=
e<br>threads w32notify w32 lcms2 multi-tty make-network-process emacs)<br><=
br>Memory information:<br>((conses 16 113316 8380)<br>=C2=A0(symbols 48 132=
10 1)<br>=C2=A0(strings 32 40080 2328)<br>=C2=A0(string-bytes 1 1310957)<br=
>=C2=A0(vectors 16 18724)<br>=C2=A0(vector-slots 8 235664 6880)<br>=C2=A0(f=
loats 8 204 73)<br>=C2=A0(intervals 56 264 0)<br>=C2=A0(buffers 1000 12))<b=
r><div><br></div></div>

--0000000000000b8600059817277b--




Acknowledgement sent to Richard Copley <rcopley@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#38363; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 21:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.