-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
HTML not parsed in notifications #118
Comments
According to the notification specification on the GNOME website, HTML is supposed to be parsed and interpreted :
(Thanks to chrstphrchvz on the Ubuntu MATE forums for pointing this out here) |
Thanks for updating here, was about to reply on the forum but was having some issues. There's actually a couple of previous issues and commits on getting markup formatting to work, as well as discussion of how gnome-notification-daemon had implemented it. See issues #106, #111, PRs #107, #110. I'm trying to test again with mate-settings-daemon 1.16.1, which hasn't made it to Ubuntu MATE yet. Edit: I can no longer reproduce the issue with 1.16.1. |
Already fixed in mate-notification-daemon 1.16.1 |
The issue still exists in 1.18.1 |
Actually, the following tags work:
The problem is only with a and img tags |
Reopening as I can reproduce the issue where a and img tags aren't parsed. I see this issue when using a browser that supports native notifications. All YouTube notifications exhibit the issue where a links aren't parsed. Some social network notifications exhibit a and img issues. |
Did it ever work before for these tags? |
Same issue here with DiscordApp, Whattapp web and Telegram web. OS: Ubuntu MATE 17.10 x64 |
If you want, I can translate to C my QRichTextParser (it is GLib-only vala-written class). It used by me in my SNI realization to translate Qt markup (it more richer) to GMarkup. |
Not ubuntu user, but mate-fedora. I have two laptops and once I run into this issue with the first one, I too thought it was caused by some mate package. So for the second laptop, I run the update but excluding any mate packages. Still the issue appeared also to the second laptop. Unfortunately, I was not able to rollback the update transaction to be able to test which package is the culprit, but it certainly was caused by update to one of the following packages: |
it isn't clear to me if Hyperlink <a href...> tag is supported or not, it seems that i was able to use it in Ubuntu 16.04 LTS and no more in Ubuntu 18.04 LTS. Other tags quoted above seem to work... |
I confirm this in MATE Desktop Environment 1.18.0 on debian stretch (mate backported) |
This is still happening with Mate 1.20.1 |
Hi everyone, indeed this is still happening and its tickling my compulsions quite hard, so I decided to take a peek at the code, but I have a few questions:
Any pointers would be appreciated. |
Based on the list at the bottom of the pango markup docs it looks like it doesn't support the |
Update: now I see the spotify notifications correctly, it fixed itself with some of the past weeks updates.
Not sure what other packages to query/show, but to me this seems to have been fixed somehow. |
Linking this here for reference: mate-desktop/mate-power-manager#272 |
I had mate-notification-daemon-1.20.0-1 originally and issue was still there. Just installed mate-notification-daemon-1.22.0-1 to see if it helps, but the issue is still happening. |
Just compiled from source and installed version 1.24.0 and the issue is still there. More specifically, the |
|
According to Desktop Notifications Specification though:
So, if |
FWIW, GtkLabel does support |
Ok, now I see where the problem is... Test: $ notify-send "title" "<a href=\"https://mate-desktop.org/es/\">MATE</a> <i>italic</i> <b>bold</b>" @cwendling are you sure the img tag doesn't work? |
@rbuj I'm not 100% sure notification-daemon doesn't handle it itself, but I would be slightly surprised. What you see in your screenshot looks like the icon that can be registered with a notification, which is not an inline |
@cwendling It's because of the engines failed to parse message body, then they show body as a raw text. |
Indeed, so there should probably be a separate validator that supports the |
Someday I wrote a translator from Qt Rich Text to Pango Markup. https://gitlab.com/vala-panel-project/xfce4-sntray-plugin/-/blob/master/src/rtparser.c |
So, I just compiled latest code with the PR #170 merged in and just wanted to share a couple of notes after testing it:
this one works just fine and produces the following notification:
this one doesn't work though and produces the following: Finally, I noticed that when the link is rendered, you can click on it and it actually opens the href URL in the default browser, which is great, BUT... it always opens it twice for me (first time when actual link is clicked on and then the second time, after a short delay, like 5 seconds or so), which is a bit annoying. |
@kion I tested all notification themes again to be sure, and I saw that all the links only opened once. You can use other types of links for your tests:
|
@rbuj tested all of these and they all (even the local file system ones) open twice for me, except the |
HTML tags in notifications is not solved, resulting in this :
(this example was taken using Rhythmbox for sending the notification, but it does also work with
notify-send
and other applications as indicated by elcste on the Ubuntu MATE forums.)Ubuntu MATE 16.10, MATE 1.16.0
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: