+GeePa Posted October 29, 2023 Share Posted October 29, 2023 I am having trouble with getting a > symbol into the image title attribute on my profile page. To simplify, I am trying something like the following for part of my profile page HTML: <img src='../images/attributes/hike_short-yes.png' border='0' title='Short hike (<1 km)' height='40' width='40'> <img src='../images/attributes/hike_med-yes.png' border='0' title='Medium hike (1 km–10 km)' height='40' width='40'> <img src='../images/attributes/hike_long-yes.png' border='0' title='Long hike (>10 km)' height='40' width='40'> However, if you look at the result this seems to make it think the > symbol is the end of the <img> tag. I checked using code like this in a regular HTML page and it worked fine so it seems to be something Groundspeak is doing rather than malformed html. I have even tried replacing the > with > but I get the same result. How can I get the > symbol in my image title attribute? This used to work until recently. Quote Link to comment
+Tungstène Posted November 1, 2023 Share Posted November 1, 2023 I can't test it for now but could you try &gt;? Quote Link to comment
+thebruce0 Posted November 2, 2023 Share Posted November 2, 2023 I would suggest also change the single quotes to double quotes. Some browsers may be forgiving of the single quote, but likely HQ's sanitization process is treating the syntax much stricter. If it doesn't like the ' as the quoted value then it almost certainly won't be friendly to the bracket within. And it's just generally safer to escape the reserved characters like html brackets, as tungstene suggested to try. Quote Link to comment
+GeePa Posted November 3, 2023 Author Share Posted November 3, 2023 On 11/1/2023 at 6:04 PM, Tungstène said: I can't test it for now but could you try &gt;? That worked. I had tried something like that but used incorrect syntax. Thanks! Quote Link to comment
+GeePa Posted November 3, 2023 Author Share Posted November 3, 2023 On 11/1/2023 at 9:59 PM, thebruce0 said: I would suggest also change the single quotes to double quotes. Some browsers may be forgiving of the single quote, but likely HQ's sanitization process is treating the syntax much stricter. If it doesn't like the ' as the quoted value then it almost certainly won't be friendly to the bracket within. And it's just generally safer to escape the reserved characters like html brackets, as tungstene suggested to try. Thanks for the suggestion, I did try double quotes, but it didn't help. Tungstène's suggestion did the trick though. Quote Link to comment
+thebruce0 Posted November 4, 2023 Share Posted November 4, 2023 Then yeah, it's got to be their sanitizing algorithm that doesn't 'like' bracket characters outside html syntax. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.