escaping - How can I escape a sequence of HTML so it can go inside a tags title attribute? -


i've been working on way long. i'm trying put html inside title attribute of tag. tooltip. of course, if going possible, have escape of necessary characters doesn't screw tag in contained. specific, how can fit following inside title attribute of tag:

<a href="test">test</a> 

that is, want this:

<div title="<a href="test">test</a>">my div</div> 

i feel i've tried everything. possible?

i googled html escape characters , found tool it: http://accessify.com/tools-and-wizards/developer-tools/quick-escape/default.php produced string can use:

&lt;a href=&quot;test&quot;&gt;test&lt;/a&gt; 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -