How to encode apostrophes for a web page

I am using the cluetip plugin , and a simple usage example is to put the content in the title attribute, as shown below:

<a title='Top title|detail content'>Text</a> 

Now I am facing problems when a line containing "verbose content" has an apostrophe inside and seems to confuse the cluetip plugin. Is there a way to escape or encode an apostrophe to let cluetip work correctly.

+6
source share
3 answers

Are you looking for &apos; .
See HTML objects .

+9
source

Do you want to use &#39; for this link , since &apos; has vulnerable browser support. See this old post for more details.

+3
source

Have you tried HTML avoiding the apostrophe?

0
source

Source: https://habr.com/ru/post/888788/


All Articles