Bug 341029 - Notifications show &lt; instead of <
Summary: Notifications show &lt; instead of <
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: 5.1.1
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Martin Klapetek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-16 18:36 UTC by Albert Astals Cid
Modified: 2014-12-02 11:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (13.34 KB, image/png)
2014-11-16 18:36 UTC, Albert Astals Cid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2014-11-16 18:36:51 UTC
Created attachment 89610 [details]
Screenshot

This is from konversation using kdelibs4. Under Plasma 4 these notifications showed fine, now they show &lt; instead of <
Comment 1 Martin Klapetek 2014-11-17 09:57:06 UTC
It works fine with Quassel, I wonder if Konversation does some escaping.

Can you please stop plasmashell, run it from konsole and then try to reproduce (have someone send you <text>), then look at the konsole for "New Notification", is the text there also escaped? That prints the raw string as received from the application.
Comment 2 Martin Klapetek 2014-11-17 12:00:29 UTC
Ok, we have investigated and know what's wrong and also working on a solution.
Comment 3 Kai Uwe Broulik 2014-11-18 20:38:45 UTC
Should be fixed by [1] and [2], please try again with recent plasma-workspace, thanks!

[1] http://quickgit.kde.org/?p=plasma-workspace.git&a=commit&h=eaa8aaccf76628b725d93797f21c902665c59d33
[2] http://quickgit.kde.org/?p=plasma-workspace.git&a=commit&h=f02dac6dd9d60760edb8ae6c52435bd6d3f26833
Comment 4 Albert Astals Cid 2014-11-18 21:34:21 UTC
No Plasma/5.1 commits?
Comment 5 Albert Astals Cid 2014-11-18 21:44:10 UTC
FWIW i added
                textFormat: Text.StyledText
to the             PlasmaComponents.Label {
in NotificationPopup.qml of Plasma/5.1 and it got fixed, maybe we can backport the fix?
Comment 6 Kai Uwe Broulik 2014-11-18 21:50:36 UTC
The change is rather invasive  in terms of potential application breakage. If an application is not escaping <>& properly it will cut off the notification or truncate parts. You need to backport the \n → <br> fix in the dataengine, too, otherwise most notifications won't have line-breaks anymore.

I leave the decision to Martin K who is maintainer of notifications but I'd prefer the patch not to be in 5.1.x to give us time to iron out potential misuse.
Comment 7 Albert Astals Cid 2014-11-18 22:05:22 UTC
Which misuse? Plasma 4 did it right, and so do other notification clients, who may be doing it right? The very small minority of KF5 users?
Comment 8 Martin Klapetek 2014-11-18 22:14:38 UTC
The notifications were mostly fully rewritten for Plasma5 and the commits above change the behavior rather radically. 

Plasma 5.1.2 is three weeks away, I'll keep an eye on this and merge it to stable if all is ok.
Comment 9 David Edmundson 2014-11-30 15:16:26 UTC
Kai, your commits you linked fixed this right?
Comment 10 Kai Uwe Broulik 2014-11-30 15:17:11 UTC
Yes. Only committed to mater, though.
Comment 11 Martin Klapetek 2014-11-30 19:49:47 UTC
I was planning to close this once it is cherry-picked to stable (as we wanted to put through some testing first as mentioned in comment #6 and #8 and it's a bug against stable after all) and also after a regression we introduced by these changes gets fixed.

I shall do so tomorrow.
Comment 12 Martin Klapetek 2014-12-02 11:58:01 UTC
Ok, all the fixes have been merged to stable and will be released with Plasma 5.1.2.