! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-notifyd support for HTML "<br>" tag
Status:
RESOLVED: MOVED
Product:
Xfce4-notifyd
Component:
general

Comments

Description Pedro Vieira 2018-12-05 11:22:41 CET
I run an application on my system which requires notifications with HTML tags (specifically <b> and <br>). However, when the notification comes trhrough, i see the following error message:

Dec 05 09:16:09 HOSTNAME xfce4-notifyd[3398]: Failed to set text '<b>TEXT</b><br>TEXT' from markup due to error parsing markup: Error on line 1 char 90: Element “markup” was closed, but the currently open element is “br”

I can reproduce the error by running the command directly:

# notify-send "<b>TEXT</b><br>TEXT"

Is this expected? are these tags supported? if not, Is there any possibility to introduce support for it?
Comment 1 Simon Steinbeiss editbugs 2018-12-06 22:52:52 CET
The <b> tag is actually supported, <br> is not. You would have to convert that to "\n" so it would work.

See the FAQ for the explanation: https://docs.xfce.org/apps/notifyd/faq

If you want more than Pango you would have to write a parser in C.
Comment 2 Pedro Vieira 2018-12-07 17:26:59 CET
hmm... strange... im not sure why but the <b> tag is not working for me...when i use :

# notify-send "<b>TEXT</b>

i see the "<b>" in clear text instead of bolding the "TEXT" word

more information about the xfce4-notifyd on my system bellow:

Information for package xfce4-notifyd:
--------------------------------------
Repository     : openSUSE-Tumbleweed-Oss            
Name           : xfce4-notifyd                      
Version        : 0.4.2-1.2                          
Arch           : x86_64                             
Vendor         : openSUSE                           
Installed Size : 311.2 KiB                          
Installed      : Yes (automatically)                
Status         : up-to-date                         
Source package : xfce4-notifyd-0.4.2-1.2.src        
Summary        : Simple Notification Daemon for Xfce
Description    :                                    
    Xfce4-notifyd is a simple, visually-appealing notification daemon for Xfce that
    implements the Freedesktop.org Desktop Notifications Specification.


is there any other way i could test this?
Comment 3 Simon Steinbeiss editbugs 2018-12-07 19:35:24 CET
What you tried with notify-send can't really work. The so-called "summary" is always bold by default with xfce4-notifyd, only the "body" supports formatting.

So you can try with:
notify-send "This is my test notification's summary" "The fact that xfce4-notifyd is the best notification service around is quite a <b>bold</b> claim."
Comment 4 Git Bot editbugs 2020-05-24 20:06:30 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-notifyd/-/issues/15.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #14945

Reported by:
Pedro Vieira
Reported on: 2018-12-05
Last modified on: 2020-05-24

People

Assignee:
Simon Steinbeiss
CC List:
0 users

Version

Attachments

Additional information