Home » , » Embed a Html Encoder Tool In Your Blog

Embed a Html Encoder Tool In Your Blog

Html Encoder tool is Very Useful tool For a Blogger.For Instance If You Want to Display a HTML On Your Blog Posts Then After Adding the Code to be Displayed On Your Post The Actual Widget or Tool Will Show Up Instead of the Widget. So In Such Cases Encoding Html is a Handy One.

Use: For Instance,Blogger Comment Form Doesn't Support the Direct Posting of HTML and JavaScript.In order to Help You in this Situations.You've to Escape/Encode the Html into Text So that they can be Easily Posted Without Any Error.The Tool Below Will Help you in this Case.You can also use it to convert your Adsense code into an Embeddable form. For Instance See the Below Examples.

'<' becomes '&lt;'
'>' becomes '&gt;'
'"' (double quote) becomes '&quot;'
''' (single quote) becomes '&#039;'
'&' becomes '&amp;'

So Add the Below Code to Add the Html Encoder Tool:

<div dir="ltr" style="text-align: left;" trbidi="on">
<style id="page-skin-1" type="text/css">
<!--
textarea {
width:50%;
color:#0080ff;
font:14px sans-serif, verdana;
background:#fff;
border:1px dotted #67A7E3; }
textarea:hover {
border:1px dotted #666;
}
input.mbt3 {
color:#000;
font: normal 12px  sans-serif, verdana;
border:1px dotted #67A7E3;
background:#C9E4FF;
}
input.mbt3:hover {
color:#289728;
font: normal 12px sans-serif, verdana;
border-left:5px solid #289728;
background:#fff;
}
input.mbt4 {
color:#3C3C3C;
font: normal 12px sans-serif, arial;
border:1px dotted #67A7E3;
background:#C9E4FF;
margin-bottom:4px;
}
input.mbt4:hover {
color:#289728;
border:1px solid #289728;
background:#fff;
}
</style>

<script type="text/javascript">
//<![CDATA[
document.write('<style type="text/css">.tabber{display:none;}<\/style>');
//]]>
</script>
<script src="http://mybloggertricks.googlecode.com/files/tabber.js" type="text/javascript">
</script>
<script src="http://mybloggertricks.googlecode.com/files/audio-player1.js" type="text/javascript">
</script>

<script type="text/javascript">
//<![CDATA[


function html2entities(){
var re=/[(<>"'&]/g
for (i=0; i<arguments.length; i++)
arguments[i].value=arguments[i].value.replace(re, function(m){return replacechar(m)})
}

function replacechar(match){
if (match=="<")
return "&lt;"
else if (match==">")
return "&gt;"
else if (match=="\"")
return "&quot;"
else if (match=="'")
return "&#039;"
else if (match=="&")
return "&amp;"
}
//]]>
</script>
<script type="text/javascript">
//<![CDATA[

//Character count script
function countit(what){
formcontent=what.form.charcount.value
what.form.displaycount.value=formcontent.length
}


//Meta tag generator
<!-- hide the script
function create(form) {
  if (confirm("Are you sure?")) {
    form.story.value = "Copy the codes below and insert them " +
      "just below Google and Yahoo verification codes below <head> Tag.\n\n"; 
    if (form.input1.value != "") {
      form.story.value +="<b:if cond='data:blog.url == data:blog.homepageUrl'>\n<meta NAME=\"Description\" CONTENT=\"" + 
      form.input1.value + "\" />\n</b:if>\n";
    }
    if (form.input2.value != "") {
      form.story.value +="<meta NAME=\"Keywords\" CONTENT=\"" + 
      form.input2.value + "\" />\n";
    }
    if (form.input3.value != "") {
      form.story.value +="<meta NAME=\"Author\" CONTENT=\"" + 
      form.input3.value + "\" />\n";
    }
    if (form.input4.value != "") {
      form.story.value +="<meta NAME=\"Robots\" CONTENT=\"" + 
      form.input4.options[form.input4.selectedIndex].value + "\" />\n";
    }
  }
}

function about() {

  msg=open("about.html","DisplayWindow","toolbar=no,width=280,height=420,directories=no,status=no,scrollbars=yes,resize=no,menubar=no");
}

// end hiding contents from old browsers  -->


//]]>
</script>
<script type="text/javascript">
//<![CDATA[
var mbt_arr = new Array();
var mbt_clear = new Array();
function mbtFloat(mbt) {
mbt_arr[mbt_arr.length] = this;
var mbtpointer = eval(mbt_arr.length-1);
this.pagetop = 0;
this.cmode = (document.compatMode && document.compatMode!="BackCompat") ? document.documentElement : document.body;
this.mbtsrc = document.all? document.all[mbt] : document.getElementById(mbt);
this.mbtsrc.height = this.mbtsrc.offsetHeight;
this.mbtheight = this.cmode.clientHeight;
this.mbtoffset = mbtGetOffsetY(mbt_arr[mbtpointer]);
var mbtbar = 'mbt_clear['+mbtpointer+'] = setInterval("mbtFloatInit(mbt_arr['+mbtpointer+'])",1);';
mbtbar = mbtbar;
eval(mbtbar);
}
function mbtGetOffsetY(mbt) {
var mtaTotOffset = parseInt(mbt.mbtsrc.offsetTop);
var parentOffset = mbt.mbtsrc.offsetParent;
while ( parentOffset != null ) {
mbtTotOffset += parentOffset.offsetTop;
parentOffset = parentOffset.offsetParent;
}
return mbtTotOffset;
}
function mbtFloatInit(mbt) {
mbt.pagetop = mbt.cmode.scrollTop;
mbt.mbtsrc.style.top = mbt.pagetop - mbt.mbtoffset + "px";
}
function closeTopAds() {
document.getElementById("mbt_bar").style.visibility = "hidden";
}
//]]>
</script>
<script type="text/javascript">
var a=navigator,b="userAgent",c="indexOf",f="&m=1",g="(^|&)m=",h="?",i="?m=1";function j(){var d=window.location.href,e=d.split(h);switch(e.length){case 1:return d+i;case 2:return 0<=e[1].search(g)?null:d+f;default:return null}}if(-1!=a[b][c]("Mobile")&&-1!=a[b][c]("WebKit")&&-1==a[b][c]("iPad")||-1!=a[b][c]("Opera Mini")||-1!=a[b][c]("IEMobile")){var k=j();k&&window.location.replace(k)};
</script><script type="text/javascript">
if (window.jstiming) window.jstiming.load.tick('headEnd');
</script>

<script>
//HTML EnCoder Provide by GIB and Made by MBT
//<![CDATA[

(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=242573159179696";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

//]]>
</script>



<div id="wrap">
<div id="outer-wrapper">
<div id="wrap2">
<div id="content-wrapper">
<div id="main-wrapper">
<div class="main section" id="main">
<div class="widget Blog" id="Blog1">
<div class="blog-posts hfeed">
<div class="post hentry">
<h2 class="post-title entry-title">
<script type="text/javascript">
    
</script>
    <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
    
</script>
  </h2>
<div class="post-body entry-content">
<form>
<textarea name="data1" style="height: 200px; width: 500px;"></textarea>&nbsp; 
<div style="text-align: left;">

</div>
<div style="text-align: left;">
&nbsp;<input class="mbt2" onclick="html2entities(this.form.data1)" onmouseout="this.className='mbt2'" onmouseover="this.className='mbt2 mbt2hov'" type="button" value="Convert" /> <input class="mbt2" onmouseout="this.className='mbt2'" onmouseover="this.className='mbt2 mbt2hov'" type="reset" value="Clear" /> </div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>


Paste this Code into HTML Section of Your Blog,Wherever You Wish to Display this Widget.

That's it Now You Have a Cool HTML Encoder tool Widget On Your Blog.Happy blogging!
Share this article :

1 comments:

  1. I was looking at some of your posts on this website and I conceive this web site is really instructive! Keep putting up.. charactercount.org

    ReplyDelete

 
Copyright © Online Business - All Rights Reserved
Proudly powered by Blogger