aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-13 23:20:26 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-04-13 23:20:26 +0000
commit25711806b398fe404c281730adccd5a82793be16 (patch)
tree05b163cdd6f8651f785146b29e6b7c344a8ea211 /phpBB/includes/message_parser.php
parent39dd567f90bb5a4f688301b26e1dfaf691cd53a4 (diff)
downloadforums-25711806b398fe404c281730adccd5a82793be16.tar
forums-25711806b398fe404c281730adccd5a82793be16.tar.gz
forums-25711806b398fe404c281730adccd5a82793be16.tar.bz2
forums-25711806b398fe404c281730adccd5a82793be16.tar.xz
forums-25711806b398fe404c281730adccd5a82793be16.zip
$message is now processed in its unslashed form. Should not break anything...
git-svn-id: file:///svn/phpbb/trunk@3831 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 409531305c..568fef2265 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -155,8 +155,10 @@ class parse_message
function bbcode_init()
{
// Always parse [code] first
+ // [quote] moved to the second position
$this->bbcode_array = array(
8 => array('#\[code\](.+\[/code\])#ise' => '$this->bbcode_code("\1")'),
+ 0 => array('#\[quote(=".*?")?\](.+?)\[/quote\]#ise' => '"[quote:$this->bbcode_uid" . $this->bbcode_quote("\1") . "]\2[/quote:$this->bbcode_uid]"'),
10 => array('#\[email(=.*?)?\](.*?)\[/email\]#ise' => '$this->validate_email("\1", "\2")'),
9 => array('#\[list(=[a-z|0-1]+)?\].*\[/list\]#ise' => '$this->bbcode_list("\0")'),
7 => array('#\[u\](.*?)\[/u\]#is' => '[u:' . $this->bbcode_uid . ']\1[/u:' . $this->bbcode_uid . ']'),
@@ -168,8 +170,7 @@ class parse_message
=> '[img:' . $this->bbcode_uid . ']\1\2[/img:' . $this->bbcode_uid . ']'),
3 => array('#\[url=?(.*?)?\](.*?)\[/url\]#ise' => '$this->validate_url("\1", "\2")'),
2 => array('#\[i\](.*?)\[/i\]#is' => '[i:' . $this->bbcode_uid . ']\1[/i:' . $this->bbcode_uid . ']'),
- 1 => array('#\[b\](.*?)\[/b\]#is' => '[b:' . $this->bbcode_uid . ']\1[/b:' . $this->bbcode_uid . ']'),
- 0 => array('#\[quote(=".*?")?\](.*?)\[/quote\]#is' => '[quote:' . $this->bbcode_uid . '\1]\2[/quote:' . $this->bbcode_uid . ']')
+ 1 => array('#\[b\](.*?)\[/b\]#is' => '[b:' . $this->bbcode_uid . ']\1[/b:' . $this->bbcode_uid . ']')
);
/**************
@@ -183,6 +184,12 @@ class parse_message
}
+ function bbcode_quote($username)
+ {
+ // Will do some stuff at some point (will hopefully prevent from breaking out quotes)
+ return $username;
+ }
+
function bbcode_code($in)
{
$str_from = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}', '.', '@');