Comment 5 for bug 1887252

Revision history for this message
Hongyi Zhao (hongyi-zhao) wrote : Re: [Bug 1887252] Re: config-error-dialog.sh should pass --no-markup

On Wed, Feb 8, 2023 at 9:15 AM Gunnar Hjalmarsson
<email address hidden> wrote:
>
> @Hongyi Zhao: As you wrote in the duplicate bug, my simplistic code in
> comment #2, which only escapes the '<' character, would not be
> sufficient. At the same time the issue I mentioned, about --no-markup
> making \n being displayed literally instead of interpreted as a newline,
> still stands.
>
> Probably this variant would do it:
>
> TEXT=$(printf '%s' "$TEXT" | sed 's/&/\&amp;/g;
> s/</\&lt;/g;
> s/>/\&gt;/g;
> s/"/\&quot;/g;
> s/'"'"'/\&#39;/g')
>
> But before making the change, I would appreciate some feedback from you
> or others that that addition to /etc/gdm3/config-error-dialog.sh would
> address the issues you have observed.

Please see the comments given by Sebastian Keller here [1].

[1] https://discourse.gnome.org/t/are-you-sure-you-want-to-proceed-message-on-login/13758/13

Best,
Zhao

> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (2005135).
> https://bugs.launchpad.net/bugs/1887252
>
> Title:
> config-error-dialog.sh should pass --no-markup
>
> Status in gdm3 package in Ubuntu:
> Incomplete
> Status in lightdm package in Ubuntu:
> Incomplete
>
> Bug description:
> I modified my ~/.profile to call "logger". This resulted in in
> producing some output on stderr like
>
> ```
> <13>Jul 11 13:02:46 /usr/sbin/lightdm-session[1408]: profile sourced ...
> ```
>
> This showed an empty zenity prompt.
>
> Logs suggest zenity was failing because it was treating `<13>` as
> pango markup.
>
> ```
> from markup due to error parsing markup: Error on line 3 char 6: “13” is not a valid
> ```
>
> We should not assume the error message strings contain valid markup,
> since their source is unknown.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1887252/+subscriptions
>