Commit 248da292 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Stop rendering HTML before specdlr exhaustion

Fixes: 22117

* shr.el (shr-descend): Stop rendering before we run out of
specpdl room (bug#22117).
parent fe4606f9
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment