]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix errors in 'shr-correct-dom-case'
authorVisuwesh <visuweshm@gmail.com>
Sun, 28 Apr 2024 11:15:40 +0000 (16:45 +0530)
committerEshel Yaron <me@eshelyaron.com>
Mon, 29 Apr 2024 19:48:03 +0000 (21:48 +0200)
* lisp/net/shr.el (shr-correct-dom-case): Don't assume each CHILD is
a cons cell.  (Bug#70626)

(cherry picked from commit 05215177a61437e864ef771afc99b130866fbcb5)

lisp/net/shr.el

index 09df5f5a9bbde50895834124b0ee43276d0fdfea..14b3f7aa1634fd154be68713f97aa99f8c0f2e7a 100644 (file)
@@ -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)