Jump to content

problem parsing [quote] bbcode


vbnullchar

Recommended Posts

im having problems parsing nested bbocdes-quotes tags


heres what im using:

[code]function convert_bbcodes($t, $u='') {
    $preg = array(
      '/\[quote=(?:&quot;|"|\')?(.*?)["\']?(?:&quot;|"|\')?\](.*?)\[\/quote(?::\w+)?\]/si'  => "<div class=\"quote\"><blockquote><h2>Originally posted by: <b>\\1</b></h2> <div class=\"\">\\2</div></blockquote></div>"
      );     
      $t = preg_replace(array_keys($preg), array_values($preg), $t );
return $t;
}[/code]

Link to comment
https://forums.phpfreaks.com/topic/28211-problem-parsing-quote-bbcode/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.