$Date: 2008-02-15 13:55:19 -0500 (Fri, 15 Feb 2008) $ | > $Revision: 1187 $ | > $Author: bfarber $ +--------------------------------------------------------------------------- | | > BB Code NEWER Module | > Module written by Matt Mecham | > Date started: Wednesday 9th March 2005 11:31 | +-------------------------------------------------------------------------- */ /** * BBCode Parsing: Core class * * This child class contains all methods * specific to the new parsing methods * * @package InvisionPowerBoard * @subpackage BBCodeParser * @author Matt Mecham * @version 2.1 * @since 2.1.0 */ /** * */ /** * BBCode Parsing: Core class * * This child class contains all methods * specific to the new parsing methods * * @package InvisionPowerBoard * @subpackage BBCodeParser * @author Matt Mecham * @version 2.1 * @since 2.1.0 */ if ( ! defined( 'IN_IPB' ) ) { print "

Incorrect access

You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files."; exit(); } class class_bbcode extends class_bbcode_core { var $parse_smilies = 0; var $parse_html = 0; var $parse_bbcode = 0; var $parse_wordwrap = 0; var $parse_nl2br = 1; var $parse_custombbcode = 1; var $_image = ''; var $_code = ''; /*-------------------------------------------------------------------------*/ // CONSTRUCTOR /*-------------------------------------------------------------------------*/ function class_bbcode( ) { } /*-------------------------------------------------------------------------*/ // Manage the raw text before inserting into the DB /*-------------------------------------------------------------------------*/ /** * Manage the raw text before inserting into the DB * * @param string Raw text * @return string Converted text */ function pre_db_parse( $txt="" ) { //----------------------------------------- // Reset //----------------------------------------- $this->quote_open = 0; $this->quote_closed = 0; $this->quote_error = 0; $this->error = ''; $this->image_count = 0; $this->emoticon_count = 0; //----------------------------------------- // Remove session id's from any post //----------------------------------------- $txt = preg_replace_callback( "#(\?|&|;|&)s=([0-9a-zA-Z]){32}(&|;|&|$)?#", array( &$this, 'regex_bash_session' ), $txt ); //----------------------------------------- // convert
to \n //----------------------------------------- if ( ! $this->parse_nl2br ) { $txt = str_replace( "\n", "", $txt ); } $txt = preg_replace( "/
|
/", "\n", $txt ); # First we did hex, now we do url encoded #