Jump to content
Sign in to follow this  
Iczer

Decode predefined entities in XML/HTML

Recommended Posts

Iczer

yeah, but i already have something like this

Local $PredefinedEntitiesInXML[5][2] = [["&quot;",'"'],["&amp;","&"],["&apos;","'"],["&lt;","<"],["&gt;",">"]]
For $k = 0 To UBound($PredefinedEntitiesInXML,1) - 1
    $sSting = StringRegExpReplace($sSting,$PredefinedEntitiesInXML[$k][0],$PredefinedEntitiesInXML[$k][1])
Next

what i wanted is

$code  = "Function func_unescape(x)" & @CRLF
$code &= "func_unescape=unescape(x)" & @CRLF
$code &= "end Function"

$vbs = ObjCreate("ScriptControl")
$vbs.language="vbscript"
$vbs.addcode($code)

$sString = $vbs.run("func_unescape",$sString)

Share this post


Link to post
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
Sign in to follow this  

×