Forum Moderators: open

Message Too Old, No Replies

Escape Codes to Regular HTML Converter

Is there such a thing?

         

WolfLover

3:12 am on Apr 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I was given a couple of scripts and since I am not that great with script language but am very good at html, I thought that if I could put my script into a converter that would turn it into regular html characters it would be easier for me to understand and such.

Ok, I put the script code in my html editor. I did a search and replace for the (for example), %3C is < Now, I did this for everything that I found except was not sure what to do with a LINE FEED as there was no code for it in the chart I am using. %0A is a Line Feed, but I don't know what to replace that with.

Anyway, is there any such thing as a converter that will convert from script using escape codes to regular html?

Sorry if this is the wrong forum.

DrDoc

5:27 am on Apr 24, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This (% followed by a hexadecimal number ranging from 00 to FF) is called URL Encoding and is very common.

In PHP, you can use

urldecode([i]string[/i])
and it will handle everything for you automatically.

<?php 
echo urlencode("place your string here");
?>

Running that, and viewing the source, will generate the decoded string exactly.

WolfLover

7:26 pm on Apr 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



DrDoc, thank you, I will try that. You are very kind. Take care!