I work with Google maps. The coordinates of points on a map and description of these points lie in an XML document. Some of the descriptions have html tags. In the derivation of the page – they are displayed as .
I understand that you need to replace < and > do it this function:
String.prototype.replaceAll = function(search, replace) {
return this.split(search).join(replace);
}
I use this:
var text = points_array[i]['text'];
text = text.replaceAll('<', "<");
var text2 = text.replaceAll('>', ">");
jQuery("#about").text(text2);
As a result, all the same effect it does not. What could be wrong?
you have to use jquery
.html()if you want the passed string to be treated as a HTML string otherwise it will always be interpreted as normal string of text