Hello,

I'm trying to load an external HTML file and encode the < with &lt.

I've tried a number of different approaches but I haven't found the
proper method yet. Here are a few examples of how I've approached
this..

$("#thisDiv").load("../sample.html");
$("#thisDiv").text("<").replaceWith("&lt");
__

$("#thisDiv").load("../sample.html").text();
$("#thisDiv").text().html();
__

$("#thisDiv").load("../sample.html").text();
$("#thisDiv").text().replace(/</g,'&lt;');

Any suggestions or ideas?

Reply via email to