Author: glen                         Date: Thu Dec  7 16:25:46 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- embed html into <body> document to discard extra lines in Kopete

---- Files affected:
SOURCES:
   nagios-jabber.alert (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/nagios-jabber.alert
diff -u SOURCES/nagios-jabber.alert:1.7 SOURCES/nagios-jabber.alert:1.8
--- SOURCES/nagios-jabber.alert:1.7     Thu Dec  7 16:53:05 2006
+++ SOURCES/nagios-jabber.alert Thu Dec  7 17:25:41 2006
@@ -81,6 +81,8 @@
                if (html == True):
                        import re
                        message = re.sub('<.*?>', '', body)
+                       doc = libxml2.parseDoc('<body>' + body + '</body>')
+                       doc_element = doc.getRootElement().children
                else:
                        message = body
 
@@ -94,8 +96,7 @@
                                xbody = node.newChild(None, "body", None)
                                html_ns = 
xbody.newNs('http://www.w3.org/1999/xhtml', None)
                                xbody.setNs(html_ns)
-                               doc = libxml2.parseDoc('<p>' + body + '</p>')
-                               xbody.addChild(doc.getRootElement())
+                               
xbody.addChildList(doc_element.docCopyNodeList(xbody.doc))
 
                        self.stream.send(msg)
                self.disconnect()
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/nagios-jabber.alert?r1=1.7&r2=1.8&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to