Closed IBBoard closed 2 years ago
That seems to happen on setting the link on UserDisplay
.
So, think we need to add Markup.escaped_text
to TextUtils.format_text
.
Is (hopefully) easy enough to fix.
Should be fixed from our side.
However, I noticed something interesting: If we set this:
<a title="https://ibboard.co.uk/?ibbtwtr&test">ibboard.co.uk/?ibbtwtr&test</a>
It moves the problem down to the hover view...
That's why I set it on my test account 😁 I remember having to fight with how many times the text is encoded to get the title to work. It's because the entity encoding resolves it for valid HTML, but then GTK takes the string from the HTML (which returns the decoded version) and sets that as markup on the tooltip.
I'm actually surprised that GTK allows the markup on the tooltip as well...
So, we need to double escape the text for tooltips then...
I've got to check exactly where it's happening, but we're getting
Failed to set text '<a href="https://ibboard.co.uk/?ibbtwtr&test" title="https://ibboard.co.uk/?ibbtwtr&test" class="weblink">ibboard.co.uk/?ibbtwtr&test</a>' from markup due to error parsing markup: Error on line 1: Entity did not end with a semicolon; most likely you used an ampersand character without intending to start an entity — escape ampersand as &
when I use my IBBTwttr account. Possibly ibboard/cawbird#78?