From 6b4c797be0c44aac50bc137cc8f03d31cbac8706 Mon Sep 17 00:00:00 2001 From: David Lichteblau Date: Wed, 15 Jun 2011 14:14:42 +0200 Subject: [PATCH] Revert "Clean up attributes before passing them to SAX" This reverts commit ce086ebadb91ae4596197719db8a8132509242ed. --- src/parse/html-parser.lisp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/parse/html-parser.lisp b/src/parse/html-parser.lisp index a264004..1fdd457 100644 --- a/src/parse/html-parser.lisp +++ b/src/parse/html-parser.lisp @@ -101,20 +101,16 @@ ;;; (merge-pathnames (or pathname (pathname input)))))) (parse-xstream xstream handler))))) -(defun good-attribute-name-p (name) - (and (cxml::valid-name-p name) - (not (or (string-equal name "xmlns") - (position #\: name))))) - (defun serialize-pt-attributes (plist recode) (loop for (name value) on plist by #'cddr - for n = #+rune-is-character (coerce (symbol-name name) 'rod) - #-rune-is-character (symbol-name name) - ;; don't emit as HAX what would be bogus as SAX anyway - if (good-attribute-name-p n) + unless + ;; better don't emit as HAX what would be bogus as SAX anyway + (string-equal name "xmlns") collect - (let ((v (etypecase value + (let* ((n #+rune-is-character (coerce (symbol-name name) 'rod) + #-rune-is-character (symbol-name name)) + (v (etypecase value (symbol (coerce (string-downcase (symbol-name value)) 'rod)) (rod (funcall recode value)) (string (coerce value 'rod))))) -- 2.11.4.GIT