PDA

View Full Version : Problem with some codes -->"<-- autoconverted to &quot;



game1283
08-24-2007, 10:49 AM
Some sites do that when you enter a code like " or < or > in comments or somewhere else.. they autoconvert it to something like &quot; just to correct it up... but what if I need to add some formatting on it? it won't work because they just do convert < or > to their symbols..

Can I do anything to stop the autoconversion and modify it's format using < or > just like coding a wepage?

Barbarossa
08-24-2007, 11:23 AM
Sites do this deliberately to stop you fuxxing up their HTML.

SaveFerris
08-24-2007, 05:44 PM
The idea is that you aren't supposed to add formatting, it's their website and as Barbarossa said, they don't want you fuxxing with it. So the answer is no, you can't.

Skiz
08-24-2007, 05:50 PM
Some sites do that when you enter a code like " or < or > in comments or somewhere else.. they autoconvert it to something like &quot; just to correct it up... but what if I need to add some formatting on it? it won't work because they just do convert < or > to their symbols..

Can I do anything to stop the autoconversion and modify it's format using < or > just like coding a wepage?



Usually, it's b/c you've copy&pasted something from a forum or site which utilizes different tags. Often times it can be fixed by changing some capitalization or editing the tags to suit the sites proper tagging methods. Basically, just play with it a bit. :P

fook3d
08-24-2007, 06:37 PM
And the simple answer is....

Theres not a thing you can do unless its your site and you have FTP access.

Going into details we have the reason...

The reason its showing the ASCII code of the character and not the actual character itself is because it is stripped. Im guessing the site you mention is PHP/MySQL based and to protect against SQL injection they will use the function below (example)

$_POST['query'] = htmlentities($_POST['query'])

That will take all characters that are not alphanumeric and convert to the ASCII value.

They could, However, Fix that by allowing it to be decoded again for the web browser by using something like:

echo html_entity_decode($query);

But again, If its not your site and you dont have FTP access, Theres pretty much nothing you can do :)

game1283
08-24-2007, 10:07 PM
ok guys.. thanks for thoughts..