Home   Best Sellers   Blogging   Coding & Design   Technology   SEO   Travel & living   Career   Videos   Tips   Online tools     
Home  »     »     »  Online HTML escape tool

Online HTML escape tool

Wednesday, January 15, 2014

Online tool for HML escaping, this tool replaces all occurences of < , > , ', " with corresponding html equivalents.

This tool is helpful for escaping javascript codes which are to be embeded in blogger templates. Just input your JS script or any string and get the HTML escaped output string.

Put here, your code for HTML escaping

Copy from here, you HTML replaced code.

Illustration of results:

Input Text:

<script type="text/javascript"><!--
google_ad_client = "ca-test-446346363636363633";
/* PHP300X250 */
google_ad_slot = "Test084082";
google_ad_width = 300;
google_ad_height = 250;
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

Output Text:

&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-test-446346363636363633&quot;;
/* PHP300X250 */
google_ad_slot = &quot;Test084082&quot;;
google_ad_width = 300;
google_ad_height = 250;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;

Make your own HTML escape tool

Copy and save the following code on an HTML page and run it on the browser.

Input Box<br/>
<textarea id="iptxt" style="height: 300px; width: 500px;" onchange="javascript:escapeHTML()" onkeypress="javascript:escapeHTML()" onblur="javascript:escapeHTML()" ></textarea><br/><br/>
Output Box<br/>
<textarea id="optxt" readonly="true" style="height: 300px; width: 500px;"></textarea>

function escapeHTML(){
var input_str=document.getElementById('iptxt').value;
input_str = input_str.replace(/</gi,"<");
input_str = input_str.replace(/>/gi,">");
input_str = input_str.replace(/'/gi,"'");
input_str = input_str.replace(/"/gi,""");
document.getElementById('optxt').innerHTML = input_str;

HTML escape tool is brought to you by crozoom.com

Share this!

How to link to this page?
If you wish to link to this page from your website, simply Copy and paste the above HTML code to your web page. It will appear on your page as:
Online HTML escape tool.

comments powered by Disqus

This Weeks 7 Popular Posts

Subscribe to Recent Posts by Email
Stay connected to CROZOOM with regular Email notices of new Techie articles and IT Jobs. Updates will be delivered to your Inbox as soon as they are posted online.

Enter Your Email Address:  

Delivered by FeedBurner   RSS Feed

Search this Blog   

Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to recruit.vo@gmail.com   Read more »