pier
Visitor
|
Re:Can't get simple chat running - 2009/09/24 14:53
with python 2.6 there is a bug in palabreServer.py i made some changes in function formatMessage(self,nodeName,attrs,texte) and seems to work fine:
def formatMessage(self,nodeName,attrs,texte): """ Returns the XML string of the message """
xml = "<"+nodeName+" " for p in attrs: if p != "c" and p != "toclient" and p != "toroom" and p !="b" and p != "back": # @TODO BUG with the DOUBLE QUOTE CHAR # HOW DO I ESCAPE THIS ???? val = str(attrs[p]) logger.info('val:'+ val)
if val.find('"') and not val.find("'"): xml += str(p)+'=''+val.replace('"','"')+''' else: xml += str(p)+"='"+val.replace('"','"')+"'"
xml += ">"+texte+"</"+nodeName+">"
return xml
|