Fix errors in 'shr-correct-dom-case'
authorVisuwesh <visuweshm@gmail.com>
Sun, 28 Apr 2024 11:15:40 +0000 (16:45 +0530)
committerEli Zaretskii <eliz@gnu.org>
Mon, 29 Apr 2024 12:14:35 +0000 (15:14 +0300)
* lisp/net/shr.el (shr-correct-dom-case): Don't assume each CHILD is
a cons cell.  (Bug#70626)

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)