From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#38372: Error in mhtml-syntax-propertize in HTML with inline script Date: Mon, 25 Nov 2019 16:57:46 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000042786b05982eabbf" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="143699"; mail-complaints-to="usenet@blaine.gmane.org" To: 38372@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 25 22:34:30 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iZM02-000bCj-86 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Nov 2019 22:34:26 +0100 Original-Received: from localhost ([::1]:48370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZM00-0006nB-Ku for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Nov 2019 16:34:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59776) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZLzM-0006a0-7n for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 16:33:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZLzK-0003Zq-Cb for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 16:33:44 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZLzK-0003Zg-9I for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 16:33:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iZLzK-0002X1-6m for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 16:33:42 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Nov 2019 21:33:42 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38372 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157470110014724 (code B ref -1); Mon, 25 Nov 2019 21:33:42 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Nov 2019 16:58:20 +0000 Original-Received: from localhost ([127.0.0.1]:49623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZHgp-0003pQ-T3 for submit@debbugs.gnu.org; Mon, 25 Nov 2019 11:58:20 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:49274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iZHgo-0003pI-DO for submit@debbugs.gnu.org; Mon, 25 Nov 2019 11:58:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52949) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZHgm-0002Ng-Dn for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 11:58:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZHgk-0001Ni-Lv for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 11:58:16 -0500 Original-Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]:33907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZHgk-0001Fh-FJ for bug-gnu-emacs@gnu.org; Mon, 25 Nov 2019 11:58:14 -0500 Original-Received: by mail-ot1-x343.google.com with SMTP id w11so13261813ote.1 for ; Mon, 25 Nov 2019 08:58:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=uiGDrtz7hw0CMgOi/AFagBUzAFk2PMGVgcRLBgO6kS8=; b=EoglXSTiRcPCcP8PBlLgTQljQfpu7ZXuulyUwgJ05l1axazfzG+yy5+6RG4PhMsIW2 GRT21FxmH7qqAHXnFne5jVsug4BmCgnwN5C2KVr2mPnLITYmxepYEuIBiABfIJ6eSYkw kC+pd7rtp7kUFTGPmJQvj1n5Ps22SAIs1r+I65u4hgzwG2hmAeMcfwRSbTZSjLlnCdqp QTL3UcfeGfqlC4c8I5SyVxsntHK2YXvA1jXZPmOzNv74UeyQJxw2doFdj22htJIJxcyG LNdlj8KZygHSHnW0mkKO06RhyhVh7mJBDvmJP3OnhBrcdYJua/zdwiWIhZDqkhAUYE+S BJvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=uiGDrtz7hw0CMgOi/AFagBUzAFk2PMGVgcRLBgO6kS8=; b=WgNkB62rBBGeLFgB43q+2adZtDr87J1MF9uN56dLPsJF6uDS0fppQlkwJmKUtL6lDG VpkfICAXZuWyc/ktPyszaGnjGtaFVaGwvS9hictdc0zk1kfi5moNP525gjK9a7CZHmi8 Bhj6ojPxH7pWGuJYT5FB0rGBB+0Sonk6wQcJ1dUAegITEn/X8JlhFkeZ+Qj/+9chYraS y3R7XPIYVh5cJ+R/pTkekwAFZ3L8cfsbkz1tx75PM4JPZN62V9jshKLynWIpPNUYfSrk AKscuTzQAFDwSC9fD+r62Sg5BY4gV15YnfqAWTdfFOU1aDEW6+Vwy9y+UkVvUR36b8Fn 06mQ== X-Gm-Message-State: APjAAAVlpHh5ly6rfpvDCwkH7/473rkzmfAm3kB5zohZ8HNeZlQZEePT PfxaDLpaNlm0wddStDz4JS8RFQriCMJgYfms1DxTz/RA X-Google-Smtp-Source: APXvYqyfUbh1UPN9RYFnY/iKC0GCAR5uddO91/h8S64T3Qh7zbkNrIgIx56Mb0vWzWjp5WpCwW3hnPCYRPIlOUb1jF0= X-Received: by 2002:a9d:154:: with SMTP id 78mr20516692otu.294.1574701092728; Mon, 25 Nov 2019 08:58:12 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:172377 Archived-At: --00000000000042786b05982eabbf 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: it's 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)) --00000000000042786b05982eabbf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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>
=C2=A0 <head>= ;
=C2=A0 =C2=A0 <script> 0 </script>
=C2=A0 </head>=
=C2=A0 <body>
=C2=A0 =C2=A0 it's
=C2=A0 </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-functi= on 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 n= il)
=C2=A0 sgml--syntax-propertize-ppss(86)
=C2=A0 mhtml-syntax-prope= rtize(33 107)
=C2=A0 syntax-propertize(50)
=C2=A0 syntax-ppss()
= =C2=A0 electric-indent-post-self-insert-function()
=C2=A0 self-insert-co= mmand(1 59)
=C2=A0 funcall-interactively(self-insert-command 1 59)
= =C2=A0 call-interactively(self-insert-command nil nil)
=C2=A0 command-ex= ecute(self-insert-command)

In GNU Emacs 27.0.50 (build 6, x86_64-w64= -mingw32)
=C2=A0of 2019-11-24 built on MACHINE
Repository revision: 5= a3e96b17c2a948ac952295962dc6e281ec5cad5
Repository branch: master
Win= dowing 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, ty= pe 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
Configur= ed using:
=C2=A0'configure --config-cache --with-modules --without-p= op --without-dbus
=C2=A0--without-gconf --without-gsettings CFLAGS=3D-O2= '

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

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

Major mode: HTM= L+JS

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

Load-path s= hadows:
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-u= tils mailheader sendmail vc-git
diff-mode easy-mmode mhtml-mode css-mode= smie eww mm-url gnus nnheader
gnus-util rmail rmail-loaddefs rfc2047 rf= c2045 ietf-drums time-date
mail-utils wid-edit mm-util mail-prsvr thinga= tpt url-queue url url-proxy
url-privacy url-expand url-methods url-histo= ry mailcap shr
text-property-search url-cookie url-domsuf url-util url-p= arse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
passw= ord-cache url-vars puny svg xml browse-url format-spec color js
json sub= r-x map imenu cc-mode cc-fonts easymenu cc-guess cc-menus
cc-cmds cc-sty= les cc-align cc-engine cc-vars cc-defs sgml-mode seq
byte-opt gv bytecom= p byte-compile cconv dom cl-loaddefs cl-lib tooltip
eldoc electric uniqu= ify ediff-hook vc-hooks lisp-float-type mwheel
dos-w32 ls-lisp disp-tabl= e term/w32-win w32-win w32-vars term/common-win
tool-bar dnd fontset ima= ge regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-m= ode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isear= ch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font= -core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-la= ng misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-= ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian c= yrillic chinese
composite charscript charprop case-table epa-hook jka-cm= pr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button = faces
cus-face macroexp files text-properties overlay sha1 md5 base64 fo= rmat
env code-pages mule custom widget hashtable-print-readable backquot= e
threads w32notify w32 lcms2 multi-tty make-network-process emacs)
<= br>Memory information:
((conses 16 113316 8380)
=C2=A0(symbols 48 132= 10 1)
=C2=A0(strings 32 40080 2328)
=C2=A0(string-bytes 1 1310957)=C2=A0(vectors 16 18724)
=C2=A0(vector-slots 8 235664 6880)
=C2=A0(f= loats 8 204 73)
=C2=A0(intervals 56 264 0)
=C2=A0(buffers 1000 12))
--00000000000042786b05982eabbf--