Jump to content

_HTMLEncode()


erifash
 Share

Recommended Posts

I have created an html encoder that makes html semi-secure (not really, just hex values). It is based off w0uter's _EncodeUrl() and a script I found on Dynamic Drive (http://dynamicdrive.com). Here is the func:

Func _HTMLEncode($s_html)
    Local $a_htm = StringSplit($s_html, ""), $s_ht = '', $i_i
    For $i_i = 1 to $a_htm[0]
        $s_ht = $s_ht & '%' & Hex(Asc($a_htm[$i_i]), 2)
    Next
    Return '<script>' & @CRLF & 'document.write(unescape("' & $s_ht & '"));' & @CRLF & '</script>'
EndFunc  ;===>_HTMLEncode()

Just look what it does to the AutoIt homepage source code! :)

BTW: Put the result into a *.htm file.

Edited by erifash
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...