diff --git a/wis2box_api/plugins/process/publish_dataset.py b/wis2box_api/plugins/process/publish_dataset.py index 2a902ce..c774682 100644 --- a/wis2box_api/plugins/process/publish_dataset.py +++ b/wis2box_api/plugins/process/publish_dataset.py @@ -199,6 +199,8 @@ def execute(self, data): try: # create the message out of the metadata msg = metadata + # dump the message to a string and sanitize html + msg = json.dumps(msg).replace('<', '<').replace('>', '>') # publish notification on internal broker private_auth = { 'username': BROKER_USERNAME, @@ -206,7 +208,7 @@ def execute(self, data): } topic = 'wis2box/dataset/publication' publish.single(topic=topic, - payload=json.dumps(msg), + payload=msg, qos=1, retain=False, hostname=BROKER_HOST,