Prevent Tooltip In Converting Html Entities
The above code for tooltip displays 'PROJECT>'. But what I need is to display the text as is 'PROJECT>' Is there a way to do this? I'm using angular.
Solution 1:
you can try something like this: create angular filter :
angular.module('ppvApp.event').filter('escapeHtml', function() {
var charMap= {
"&": "&",
"<": "<",
">": ">",
'"': '"',
"'": ''',
"/": '/'
};
returnfunction(str) {
returnString(str).replace(/[&<>"'\/]/g, function(s) {
return charMap[s];
});
}
});
and then use it as:
<input ng-model="test" placeholder="pre"type="text" title="{{'PROJECT>' | escapeHtml}}" />
Solution 2:
You need to use the encoded string in the title. You can use online tools such as this one to do this.
<inputng-model="test"placeholder="pre"type="text"title="PROJECT&GT" />
Solution 3:
One way to go is to separate the &
from the GT
(or any other similar entity) with a 
which is a Zero Width No-Break Space (http://www.codetable.net/hex/feff), like this:
<inputng-model="test"placeholder="pre"type="text"title="PROJECT&GT" />
Post a Comment for "Prevent Tooltip In Converting Html Entities"