Update of /cvsroot/emacs-jabber/emacs-jabber
In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv17355
Modified Files:
jabber-xml.el
Log Message:
Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-478
Creator: Magnus Henoch <ma...@fr...>
jabber-xml-skip-tag-forward: Handle CDATA sections
Index: jabber-xml.el
===================================================================
RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-xml.el,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- jabber-xml.el 21 Nov 2007 12:48:01 -0000 1.21
+++ jabber-xml.el 19 Apr 2008 22:55:48 -0000 1.22
@@ -1,6 +1,6 @@
;; jabber-xml.el - XML functions
-;; Copyright (C) 2003, 2004, 2007 - Magnus Henoch - ma...@fr...
+;; Copyright (C) 2003, 2004, 2007, 2008 - Magnus Henoch - ma...@fr...
;; Copyright (C) 2002, 2003, 2004 - tom berger - ob...@in...
;; This file is a part of jabber.el.
@@ -102,8 +102,12 @@
The version of `sgml-skip-tag-forward' in Emacs 21 isn't good
enough for us."
(skip-chars-forward "^<")
- (if (not (looking-at "<\\([^ \t\n/>]+\\)\\([ \t\n]+[^=]+='[^']*'\\|[ \t\n]+[^=]+=\"[^\"]*\"\\)*"))
- (throw 'unfinished nil)
+ (cond
+ ((looking-at "<!\\[CDATA\\[")
+ (if (search-forward "]]>" nil t)
+ (goto-char (match-end 0))
+ (throw 'unfinished nil)))
+ ((looking-at "<\\([^ \t\n/>]+\\)\\([ \t\n]+[^=]+='[^']*'\\|[ \t\n]+[^=]+=\"[^\"]*\"\\)*")
(let ((node-name (match-string 1)))
(goto-char (match-end 0))
(cond
@@ -119,7 +123,9 @@
(goto-char (match-end 0))
t)
(t
- (throw 'unfinished nil))))))
+ (throw 'unfinished nil)))))
+ (t
+ (throw 'unfinished nil))))
(defsubst jabber-xml-node-name (node)
"Return the tag associated with NODE.
|