Skip to content

notification: escape notification message body

Clayton Craft requested to merge craftyguy/chatty:notification_escape into master

Notification daemons generally support markup in the message, and when chatty tries to send a notification with text that fails markup parsing then the notification does not contain the text at all.

E.g. receiving a SMS with the contents: "<wooohoo>" generates the following warning in Phosh:

(phosh:22722): Gtk-WARNING **: 13:57:15.935: Failed to set text '<wooohoo>' from markup due to error parsing markup: Error on line 1 char 24: Element “markup” was closed, but the currently open element is “wooohoo”

I also took the liberty to reorder the switch cases to reduce duplicate code.

Edited by Clayton Craft

Merge request reports