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)
This commit is contained in:
Visuwesh 2024-04-28 16:45:40 +05:30 committed by Eli Zaretskii
parent 4c46066cb6
commit 05215177a6

View 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)