Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

How To Do: Translate HTML codes to normal text

$
0
0
I have a script program that I tried using the following code:

Code:

  '
  '
  $value =~ tr/+/ /;
  $value =~ tr/%21/!/;
  $value =~ tr/%22/"/;
  $value =~ tr/%25/%/;
  $value =~ tr/%26/&/;
  $value =~ tr/%28/(/;
  $value =~ tr/%29/)/;
  $value =~ tr/%2C/,/;
  $value =~ tr/%2F/|/;
  $value =~ tr/%3C/>/;
  $value =~ tr/%3D/=/;
  $value =~ tr/%3E/</;
  '
  '

Unfortunately it does'nt do what I though it would do.

I want to take each HTML code like %xx and change it to the real character.

For example %3E = "<" and %3C = ">"

Anyone know how to do this?

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>