The Arcive of vBulletin Modifications Site. |
|
Problems eval'ing bbcodeparse'd string. Details »»
|
|||||||||||||||||||||||||
I'm trying to use the bbcodeparse function for a messaging section I am writing for my site. It uses a template so I used the eval function to copy the text to a variable. Here's the code:
Code:
$bbmessage = bbcodeparse(stripslashes($test[message]));
eval("\$mymessage = \"".$bbmessage."\";");
Parse error: parse error in /home/lancer/forums/test.php(100) : eval()'d code on line 5 If I use addslashes then it parses, but there are slashes after apostrophes and such. If anyone may know how to correct this, that would be great. Thanks, Mark Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
I tried replacing just the apostrophy and it works. Here's the code:
Code:
$bbmessage = addslashes(bbcodeparse(stripslashes($im[message])));
eval("\$immessage = \"".str_replace("\'","'",$bbmessage)."\";");
Thanks, Mark |
![]() |
|
|