Notification daemon only displays the title when the body has HTML tags

Bug #637997 reported by Juan Simón
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Awn Extras
Confirmed
Undecided
moonbeam

Bug Description

When I execute this:
notify-send "title" "this is the body"

Notification daemon works well, but if I execute this:
notify-send "title" "this is the body<br>this is a newline"

Notification daemon only displays the title (I attach one screenshot)
---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
NonfreeKernelModules: nvidia
Package: avant-window-navigator-trunk 0.4.1~bzr743+201009122042~lucid1
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, user)
 LANG=es_ES.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-24.42-generic-pae 2.6.32.15+drm33.5
Tags: lucid
Uname: Linux 2.6.32-24-generic-pae i686
UnreportableReason: This is not a genuine Ubuntu package
UserGroups: adm admin cdrom dialout dip fax floppy fuse lp lpadmin nopasswdlogin plugdev sambashare tape users vboxusers video winbindd_priv

---
Architecture: i386
DistroRelease: Ubuntu 10.04
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
NonfreeKernelModules: nvidia
Package: awn-applets-c-core-trunk 0.4.1~bzr1371-1.10.04
PackageArchitecture: i386
ProcEnviron:
 PATH=(custom, user)
 LANG=es_ES.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-24.42-generic-pae 2.6.32.15+drm33.5
Tags: lucid
Uname: Linux 2.6.32-24-generic-pae i686
UnreportableReason: This is not a genuine Ubuntu package
UserGroups: adm admin cdrom dialout dip fax floppy fuse lp lpadmin nopasswdlogin plugdev sambashare tape users vboxusers video winbindd_priv

Revision history for this message
Juan Simón (simonbcn) wrote :
tags: added: apport-collected
description: updated
Revision history for this message
Juan Simón (simonbcn) wrote : Dependencies.txt

apport information

description: updated
Revision history for this message
Juan Simón (simonbcn) wrote :

apport information

onox (onox)
Changed in awn-extras:
assignee: nobody → moonbeam (rcryderman)
Juan Simón (simonbcn)
summary: - Notification daemon sometimes only displays the title when the body has
- HTML tags
+ Notification daemon only displays the title when the body has HTML tags
Revision history for this message
Michal Hruby (mhr3) wrote :

AFAICT, the spec only says that a very limited subset of HTML tags should be supported (namely b,u,i,img,a) and moreover the markup should be XML-based (so perhaps with <br/> it'll work). Anyway, you can just use standard \n instead of the br tag.

Revision history for this message
Juan Simón (simonbcn) wrote :

Where's that specs?
"<br/>" doesn't work either with "Notification daemon".
"\n" doesn't work any ways. "\n" is standard in console, not in libnotify.
By other way, if "<br>" and "<br/>" is interpreted by libnotify, "Notification daemon" should display it.
And what is wrong at all is that if there is a HTML tag "Notification daemon" does not show anything.

Revision history for this message
Gabor Karsay (gabor-karsay) wrote :

The spec is here: http://www.galago-project.org/specs/notification/0.9/x161.html and it should indeed support only b, u, i, a, img (or filter them out). Hence <br> and <br/> should be displayed as plain text.

Revision history for this message
Juan Simón (simonbcn) wrote :

Well, and how do you explain that libnotify interprets <br> but AWN notification daemon don't?
If AWN notification daemon doesn't interpret the "standard \n" nor "<br>", how do you suppose that I'll make a newline?
This applet is "A replacement for the standard notification daemon and notify-osd.", however it behaves differently. ¿?
And it not only fails with messages sent from notify-send, it also fails with notifications of other programs.

Revision history for this message
moonbeam (rcryderman) wrote :

I will have a look into this when I have an opportunity. But the spec seems very clear that "A full-blown HTML implementation is not required of this spec, and notifications should never take advantage of tags that are not listed above". I guess it is possible that there is a newer version of the spec available, or that Ubuntu has enabled extensions. My guess is that there is something going wrong here, but that it isn't correct to interpret any additional tags than those specified in the spec. Instead I think it's breaking when provided with non-supported HTML where it should either be filtered or output literally - instead I think we're just showing blanks in some cases.

Revision history for this message
Juan Simón (simonbcn) wrote :

The spec are only that: specs. Nothing more. It's a guide, not he real implementation.

I repeat:
1) How do you explain that libnotify interprets <br> but AWN notification daemon don't? Someone has tested the notify-send with "<br>" in another distro?
2) If AWN notification daemon doesn't interpret the "standard \n" nor "<br>", how do you suppose that I'll make a newline?
3) This applet is "A replacement for the standard notification daemon and notify-osd.", however it behaves differently. ¿?
4) Do you know that it also fails with notifications of other programs?
5) The specs says that if the text has a HTML tag not supported, Doesn't it show nothing!?

Revision history for this message
Juan Simón (simonbcn) wrote :

The most recent date of these specifications is January 2006. A little old, right?
I would say that this project isn't well documented.

Revision history for this message
Gabor Karsay (gabor-karsay) wrote :

Yes, it's a bug, forgot to confirm before. It should display something. There's also some error output in terminal.
As to your other questions:
notify-osd interprets <br> and <br/> as newline but ignores \n (prints it literally).
Gnome notification daemon (tested with Fedora 13) displays nothing, if there's unknown markup like <br> and <br/>. It interprets \n as a new line.
All three accept something like this:
$ notify-send "title" "line1
> line2
> line3"

With which other programs does it fail? Do these programs rely on \n or on <br>?

Changed in awn-extras:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.