From: Lars Ingebrigtsen <larsi@gnus.org>
Date: Fri, 25 Dec 2015 05:19:34 +0000 (+0100)
Subject: Stop rendering HTML before specdlr exhaustion
X-Git-Tag: emacs-26.0.90~2875
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=248da292fe46224b0b5a79b632c89cf4de2c2081;p=emacs.git

Stop rendering HTML before specdlr exhaustion

Fixes: 22117

* shr.el (shr-descend): Stop rendering before we run out of
specpdl room (bug#22117).
---

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 8a3f73e0f83..905c9c5c76d 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -432,8 +432,8 @@ size, and full-buffer size."
 	(shr-stylesheet shr-stylesheet)
 	(shr-depth (1+ shr-depth))
 	(start (point)))
-    ;; shr uses about 12 frames per nested node.
-    (if (> shr-depth (/ max-specpdl-size 12))
+    ;; shr uses many frames per nested node.
+    (if (> shr-depth (/ max-specpdl-size 15))
 	(setq shr-warning "Too deeply nested to render properly; consider increasing `max-specpdl-size'")
       (when style
 	(if (string-match "color\\|display\\|border-collapse" style)