-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discord notifications look wrong #729
Comments
Well Why not set |
All in all, I'm also open to this idea, it would allow for some interesting customizations, perhaps even alternative rule implementations. |
Discord doesn't properly escape angle brackets in notifications, which confuses pango (I've opened a bug with them as well, but it would be nice to be able to work around things like this with scripts). |
For this issue I see 2 ways forward, either the solution mentioned above (implementing filter scripts), or expanding our makeshift markup parser to accept all escaped characters, I'm fine with both, however I don't know when/if I'll pick this one up but I am open to PRs. For the first one, the person implementing it can use
|
is this issue still relevant? |
Yes |
what happened in the bug report with pango? |
It seems that Discord escapes some markup characters, including apostrophes, but does not properly escape angle brackets. This means that without setting
markup = strip
, any message with angle brackets will render incorrectly, but when settingmarkup = strip
, any character Discord does escape shows up as an HTML entity in the notification (e.g. a notification will say "aren't" instead of "aren't").One solution I have tried was to use the
script
attribute together with a script which replaced the angle brackets with their HTML entity representation then sent a new notification, using its command line arguments for the information. However, this did not work very well because it seems that the custom icons used by Discord are not passed in to the script as the icon argument is empty. Additionally, Discord replaces certain old notifications in a channel with new ones, but since this solution replaces the notification entirely, including its ID, that does not work.One possible solution to similar issues where modifying the content or other attributes of a notification in arbitrary ways is desirable could be to allow scripts to modify the attributes of a notification, rather than simply replacing the notification. This could potentially be done by having the script print the desired attributes to standard output (possibly null-separated).
I am running version 1.4.1 of Dunst on Artix Linux (which is basically Arch but with OpenRC).
The text was updated successfully, but these errors were encountered: