aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-02-23 11:26:23 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-02-23 11:26:23 +0000
commit0a5c435102dbdfce9b773c5ba4c0a91e42141108 (patch)
treef9da733fdcef73b5b554196c40977bc5b3ccc66c /phpBB
parent435c1311276e4c7208f7be8704fa79a63bf54459 (diff)
downloadforums-0a5c435102dbdfce9b773c5ba4c0a91e42141108.tar
forums-0a5c435102dbdfce9b773c5ba4c0a91e42141108.tar.gz
forums-0a5c435102dbdfce9b773c5ba4c0a91e42141108.tar.bz2
forums-0a5c435102dbdfce9b773c5ba4c0a91e42141108.tar.xz
forums-0a5c435102dbdfce9b773c5ba4c0a91e42141108.zip
Fix Custom BBCode {EMAIL}-Token usage - #21155
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8387 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html4
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php4
-rw-r--r--phpBB/includes/functions.php2
3 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 91d255bd78..7e2e1a4663 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -120,7 +120,9 @@
<li>[Fix] Respect signature permissions in posting (Bug #16029)</li>
<li>[Fix] Users allowed to resign only from open and freely open groups (Bug #19355)</li>
<li>[Fix] Assign a last viewed date to converted topics (Bug #16565)</li>
- <li>[Fix] Many minor and/or cosmetic fixes (Including, but not limited to: #21315, #18575, #18435, #21215,)</li>
+ <li>[Fix] Many minor and/or cosmetic fixes (Including, but not limited to: #21315, #18575, #18435, #21215)</li>
+ <li>[Feature] New option to hide the entire list of subforums on listforums</li>
+ <li>[Fix] Custom BBCode {EMAIL}-Token usage (Bug #21155)</li>
</ul>
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index 21370036ee..33e8fe7ec1 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -312,7 +312,7 @@ class acp_bbcodes
'!(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')!e' => "\$this->bbcode_specialchars('$1')"
),
'EMAIL' => array(
- '!([a-z0-9]+[a-z0-9\-\._]*@(?:(?:[0-9]{1,3}\.){3,5}[0-9]{1,3}|[a-z0-9]+[a-z0-9\-\._]*\.[a-z]+))!i' => "\$this->bbcode_specialchars('$1')"
+ '!(' . get_preg_expression('email') . ')!ie' => "\$this->bbcode_specialchars('$1')"
),
'TEXT' => array(
'!(.*?)!es' => "str_replace(array(\"\\r\\n\", '\\\"', '\\'', '(', ')'), array(\"\\n\", '\"', '&#39;', '&#40;', '&#41;'), trim('\$1'))"
@@ -334,7 +334,7 @@ class acp_bbcodes
$sp_tokens = array(
'URL' => '(?i)((?:' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('url')) . ')|(?:' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('www_url')) . '))(?-i)',
'LOCAL_URL' => '(?i)(' . str_replace(array('!', '\#'), array('\!', '#'), get_preg_expression('relative_url')) . ')(?-i)',
- 'EMAIL' => '([a-zA-Z0-9]+[a-zA-Z0-9\-\._]*@(?:(?:[0-9]{1,3}\.){3,5}[0-9]{1,3}|[a-zA-Z0-9]+[a-zA-Z0-9\-\._]*\.[a-zA-Z]+))',
+ 'EMAIL' => '(' . get_preg_expression('email') . ')',
'TEXT' => '(.*?)',
'SIMPLETEXT' => '([a-zA-Z0-9-+.,_ ]+)',
'IDENTIFIER' => '([a-zA-Z0-9-_]+)',
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 385a1ea72e..43499e0eea 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2756,7 +2756,7 @@ function get_preg_expression($mode)
switch ($mode)
{
case 'email':
- return '[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*[a-z]+';
+ return '[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
break;
case 'bbcode_htm':