JAVASCRIPT 52
HTML to XML Converter Guest on 20th April 2021 09:31:47 AM
  1. <div style="text-align: center;">
  2. <b>Enter Code: </b></div>
  3.  
  4. <div style="text-align: center;">
  5. <script type="text/javascript">// <![CDATA[
  6. function $(id){ return document.getElementById(id) } var char2entity = { "'" : '&#39;', '"' : '&quot;',  '<' : '&lt;', '>' : '&gt;',  '&#038;' : '&amp;'}; function encode_entities(str) {   var rv = '';  for (var i = 0; i < str.length; i++) {    var ch = str.charAt(i);    rv += char2entity[ch] || ch;  }   return rv;} function do_encode(e){  $('dst').value = encode_entities(e.value)}
  7. // ]]&gt;</script>
  8. <textarea cols="40" onchange="do_encode(this)" onkeyup="do_encode(this)" rows="10" style="font-family: monospace; height: 10em; width: 40em;"></textarea><b>&nbsp;</b><br />
  9. <b>Parsed Code</b></div>
  10.  
  11.  
  12. <div style="text-align: center;">
  13. <textarea cols="40" id="dst" onclick="this.select()" onfocus="this.select()" readonly="readonly" rows="10" style="font-family: monospace; height: 10em; width: 40em;"></textarea><br /></div>
  14. <div style="font-family: Arial,Helvetica,sans-serif; text-align: left;">
  15. Script Credit: <a href= "https://www.IMRandell.com" title="IMRandell Codes and Scripts For Website Owners And Bloggers" target= "_blank">IMRandell</a>
  16. </div>

OXAUS can store text, source code or sensitive data for a set period of time Anonymously.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste
 
Parsed Code

Script Credit: IMRandell

Login or Register to edit or fork this paste. It's free.