Skip to content

Commit

Permalink
tests: Assert that href attributes are escaped correctly
Browse files Browse the repository at this point in the history
Strictly speaking the exact form of escaping used here is an
implementation detail of GLib (it would be equally valid to re-escape
the encoded characters with numeric character references like
`"><html>` or similar), but it seems unlikely that
GLib will change this in practice.

Reproduces: #1545
Signed-off-by: Simon McVittie <[email protected]>
  • Loading branch information
smcv authored and GeorgesStavracas committed Feb 14, 2025
1 parent 9c37dae commit b8bb1e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ def test_markup(self, portals, dbus_con, app_id):
'test <a href="https://example.com"><b>Some link</b></a>',
'test <a href="https://example.com"><b>Some link</b></a>',
),
(
'<a href="https://xkcd.com/327/#&quot;&gt;&lt;html&gt;"></a>',
'<a href="https://xkcd.com/327/#&quot;&gt;&lt;html&gt;"></a>',
),
(
"test \n newline \n\n some more space \n with trailing space ",
"test newline some more space with trailing space",
Expand Down

0 comments on commit b8bb1e0

Please sign in to comment.