Top

HTML encoder


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Jul 16, 2009
Last Updated  Jul 16, 2009
Tags  encoder  html 

Introduction

Well as the title sais, this is a html encoder. I know it's not 100% correct atm, but it's a start.

Usage:
$htmlencode(html goes here)

Grab the Code

alias htmlencode {
  var %str = $replace($1-,&,&,<,<,>,>)
  var %str = $regsubex(%str,/&#(\d+?);/g,$chr(\1))
  var %str = $regsubex(%str,/&#x([\dA-F][\dA-F]);/g,$chr($base(\1,16,10)))
  return %str
}

Comments

  (2)  RSS
Noutrious
Comments: 365
 
mIRC Snippet:  HTML encoder
Posted on Jul 16, 2009 10:36 am
alias htmlencode return $regsubex($regsubex($replace($1-,&,&,<,<,>,>),/&#(\d+?);/g,$chr(\1)),/&#x([\dA-F][\dA-F]);/g,$chr($base(\1,16,10)))
Solitude
Comments: 23
 
mIRC Snippet:  HTML encoder
Posted on Jul 16, 2009 7:06 pm
Blargh. I don't really understand Regular Expressions, lol. Not how mIRC uses them, anyways..

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom