t 'literal))
(goto-char (point-min))
- (while (re-search-forward "&UU\\+\\([0-9A-F]+\\);" nil t)
- (setq code (string-to-int (match-string 1) 16))
+ (while (re-search-forward "&\\(UU\\+\\|U-\\)\\([0-9A-F]+\\);" nil t)
+ (setq code (string-to-int (match-string 2) 16))
(replace-match
(format "<img alt=\"UU+%04X\" src=\"http://www.unicode.org/cgi-bin/refglyph?24-%04X\">"
code
(setq key (substring key 1)))
(setq dest
(format "%s %s=\"%s\""
- dest key val)))
+ dest key
+ (www-format-encode-string
+ (format "%s" val) 'without-tags))))
dest))
(defun www-xml-format-unit (format-unit)
(let (name props children ret)
(cond
((stringp format-unit)
- format-unit)
+ (www-format-encode-string format-unit 'without-tags)
+ ;; (mapconcat (lambda (c)
+ ;; (cond
+ ;; ((eq c ?<) "&lt;")
+ ;; ((eq c ?>) "&gt;")
+ ;; (t
+ ;; (char-to-string c))))
+ ;; format-unit "")
+ )
((consp format-unit)
(setq name (car format-unit)
props (nth 1 format-unit)