From: Visuwesh Date: Sun, 28 Apr 2024 11:15:40 +0000 (+0530) Subject: Fix errors in 'shr-correct-dom-case' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bdc08e78aef8c9690cf58f203599fd9f55284762;p=emacs.git Fix errors in 'shr-correct-dom-case' * lisp/net/shr.el (shr-correct-dom-case): Don't assume each CHILD is a cons cell. (Bug#70626) (cherry picked from commit 05215177a61437e864ef771afc99b130866fbcb5) --- diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 09df5f5a9bb..14b3f7aa163 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1510,7 +1510,8 @@ Based on https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-infore (when-let ((rep (assoc-default (car attr) shr-correct-attribute-case))) (setcar attr rep))) (dolist (child (dom-children dom)) - (shr-correct-dom-case child)) + (when (consp child) + (shr-correct-dom-case child))) dom) (defun shr-tag-svg (dom)