PDA

View Full Version : HTML is viewed as plaintext


charlie71
09-21-2008, 10:54 AM
hello :)

i have a lot of posts in my database that are inserted manually.

they look like this (in database):
<center>text lorem ipsum\n\n<a href=\"bla\" target=\"_self\"></a></center>

now they are viewed as plaintext like this (in threads):
;&lt;center&gt;text lorem ipsum&lt;a href="bla"&gt;&lt;/a&gt;&lt;/center&gt;

which php-files i have to search for to stripslashes the content before its parsed? its not a problem for me to write a few lines of code, but there are so many files that i lost the view and dont know how to search...

€dit: Thread can be closed... found a solution thanks to the API reference.

I have done it this way

In class_bbcode.php on line 417 replace:
$text = fetch_censored_text($text);
with this:
$text = unhtmlspecialchars(fetch_censored_text($text));

maybe a bit dirty, but it works great!

thanks in advance!
cheers

MoT3rror
09-23-2008, 02:30 AM
The characters are supposed to come up like that to protect yourself from XSS.