2011-03-01, 07:56 AM
I'm currently writing a plgin that takes user input via a text area. I'm passing the input throgh the parser with the below code:
Everything was working fine last night, but when I opened my test site up today, newlines don't appear to be getting parsed for some reason. I'm not sure if it's an issue with my code or my localhost, but I'd like somebody to just double check that what I'm doing is right.
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new postParser;
$options = array(
"allow_html" => 0,
"allow_mycode" => 1,
"allow_smilies" => 1,
"allow_imgcode" => 0,
"filter_badwords" => 1,
"nl2br" => 1,
"allow_videocode" => 0,
"me_username" => $mybb->user['username'],
);
$viddesc = $parser->parse_message($viddesc, $options);
Everything was working fine last night, but when I opened my test site up today, newlines don't appear to be getting parsed for some reason. I'm not sure if it's an issue with my code or my localhost, but I'd like somebody to just double check that what I'm doing is right.