- (let* ((pos (point))
- (string (progn (if (search-forward "<" nil t)
- (forward-char -1)
- (goto-char (point-max)))
- (buffer-substring pos (point)))))
- ;; Clean up the string. As per XML specifications, the XML
- ;; processor should always pass the whole string to the
- ;; application. But \r's should be replaced:
- ;; http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends
- (setq pos 0)
- (while (string-match "\r\n?" string pos)
- (setq string (replace-match "\n" t t string))
- (setq pos (1+ (match-beginning 0))))
-
- (xml-substitute-special string)))
+ (let* ((pos (point))
+ (string (progn (if (search-forward "<" nil t)
+ (forward-char -1)
+ (goto-char (point-max)))
+ (buffer-substring-no-properties pos (point)))))
+ ;; Clean up the string. As per XML specifications, the XML
+ ;; processor should always pass the whole string to the
+ ;; application. But \r's should be replaced:
+ ;; http://www.w3.org/TR/2000/REC-xml-20001006#sec-line-ends
+ (setq pos 0)
+ (while (string-match "\r\n?" string pos)
+ (setq string (replace-match "\n" t t string))
+ (setq pos (1+ (match-beginning 0))))
+
+ (xml-substitute-special string)))