----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/121296/#review71134 -----------------------------------------------------------
This didn't work? http://qt-project.org/doc/qt-5/qstring.html#toHtmlEscaped - Mark Gaiser On nov 30, 2014, 8:33 p.m., Kai Uwe Broulik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/121296/ > ----------------------------------------------------------- > > (Updated nov 30, 2014, 8:33 p.m.) > > > Review request for Plasma and Martin Klapetek. > > > Bugs: 341029 > https://bugs.kde.org/show_bug.cgi?id=341029 > > > Repository: plasma-workspace > > > Description > ------- > > Since notifications now enforce StyledText and due to how QtQuick Text (or > QTextDocument for that matter) treat HTML entities, it cuts off text whenever > there's a alone & somewhere. > > This fancy regexp from [1] keeps " & < > and > ' while replacing any other with &. This makes the StyledText > enforcement safe for 5.1 imho. > > (My impression is that an & triggeres the "look for the semicolon that > terminates this entity" which it won't find and then just cut off the text, > see QTBUG-33368, in contrast to every webbrowser that just prints these > verbatim) > > [1] > https://stackoverflow.com/questions/16423089/regex-match-ampersand-but-not-escaped-xml-characters > > > Diffs > ----- > > dataengines/notifications/notificationsengine.cpp 8bc50e7 > > Diff: https://git.reviewboard.kde.org/r/121296/diff/ > > > Testing > ------- > > Deleting "Battery & Brightness" undo notification works as expected and > kdialog --passivepopup "test & test & test "test"" works as > expected > > > Thanks, > > Kai Uwe Broulik > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel