Skip to content
Snippets Groups Projects
Commit 82c8516c authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent sending invalid XML chars in pm and in muc. Fixes #4354

parent 3079845b
No related branches found
No related tags found
No related merge requests found
...@@ -129,6 +129,11 @@ class PrivateChatControl(ChatControl): ...@@ -129,6 +129,11 @@ class PrivateChatControl(ChatControl):
def send_message(self, message): def send_message(self, message):
'''call this function to send our message''' '''call this function to send our message'''
if not message:
return
message = helpers.remove_invalid_xml_chars(message)
if not message: if not message:
return return
...@@ -1604,6 +1609,11 @@ class GroupchatControl(ChatControlBase): ...@@ -1604,6 +1609,11 @@ class GroupchatControl(ChatControlBase):
def send_message(self, message): def send_message(self, message):
'''call this function to send our message''' '''call this function to send our message'''
if not message:
return
message = helpers.remove_invalid_xml_chars(message)
if not message: if not message:
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment