Jump to content

Trouble getting a > symbol in my img title attribute for my profile page


GeePa

Recommended Posts

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 &gt; but I get the same result.  How can I get the > symbol in my image title attribute?  This used to work until recently.

Link to comment

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.

Link to comment
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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...