]> git.pld-linux.org Git - packages/nagios-alert-jabber.git/commitdiff
- embed html into <body> document to discard extra lines in Kopete
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 7 Dec 2006 16:25:41 +0000 (16:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nagios-jabber.alert -> 1.8

nagios-jabber.alert

index 4f4419783444252470af87d663d2f3e8098292e1..591879c0af22823c6e9ff5d2e1fa5289b1b9ce1c 100644 (file)
@@ -81,6 +81,8 @@ class Client(JabberClient):
                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 @@ class Client(JabberClient):
                                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()
This page took 0.070838 seconds and 4 git commands to generate.