aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-02-23 15:03:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-02-23 15:03:50 +0000
commit2092f07c544b0a44aba085216eeadc84be5cec5d (patch)
tree5b37ec747bae2ca638a5c04b7c7f79ce1d229fd6 /phpBB
parent2003152c8dd9c760135ec831b49e41adcfd02142 (diff)
downloadforums-2092f07c544b0a44aba085216eeadc84be5cec5d.tar
forums-2092f07c544b0a44aba085216eeadc84be5cec5d.tar.gz
forums-2092f07c544b0a44aba085216eeadc84be5cec5d.tar.bz2
forums-2092f07c544b0a44aba085216eeadc84be5cec5d.tar.xz
forums-2092f07c544b0a44aba085216eeadc84be5cec5d.zip
Correctly return sole whitespaces if used with BBCodes - #19535
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8392 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/message_parser.php20
2 files changed, 11 insertions, 10 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 34686de59f..36c52a23c8 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -126,6 +126,7 @@
<li>[Fix] Do not rely on parameter returned by unlink() for verifying cache directory write permission (Bug #19565)</li>
<li>[Change] Use correct string for filesize (MiB instead of MB for example)</li>
<li>[Change] Remove left join for query used to retrieve already assigned users and groups within permission panel (Bug #20235)</li>
+ <li>[Fix] Correctly return sole whitespaces if used with BBCodes (Bug #19535)</li>
</ul>
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 9e4b075818..e78fc271a6 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -198,7 +198,7 @@ class bbcode_firstpass extends bbcode
if (!$this->check_bbcode('size', $in))
{
- return '';
+ return $in;
}
if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
@@ -224,7 +224,7 @@ class bbcode_firstpass extends bbcode
{
if (!$this->check_bbcode('color', $in))
{
- return '';
+ return $in;
}
return '[color=' . $stx . ':' . $this->bbcode_uid . ']' . $in . '[/color:' . $this->bbcode_uid . ']';
@@ -237,7 +237,7 @@ class bbcode_firstpass extends bbcode
{
if (!$this->check_bbcode('u', $in))
{
- return '';
+ return $in;
}
return '[u:' . $this->bbcode_uid . ']' . $in . '[/u:' . $this->bbcode_uid . ']';
@@ -250,7 +250,7 @@ class bbcode_firstpass extends bbcode
{
if (!$this->check_bbcode('b', $in))
{
- return '';
+ return $in;
}
return '[b:' . $this->bbcode_uid . ']' . $in . '[/b:' . $this->bbcode_uid . ']';
@@ -263,7 +263,7 @@ class bbcode_firstpass extends bbcode
{
if (!$this->check_bbcode('i', $in))
{
- return '';
+ return $in;
}
return '[i:' . $this->bbcode_uid . ']' . $in . '[/i:' . $this->bbcode_uid . ']';
@@ -278,7 +278,7 @@ class bbcode_firstpass extends bbcode
if (!$this->check_bbcode('img', $in))
{
- return '';
+ return $in;
}
$in = trim($in);
@@ -340,7 +340,7 @@ class bbcode_firstpass extends bbcode
if (!$this->check_bbcode('flash', $in))
{
- return '';
+ return $in;
}
$in = trim($in);
@@ -377,7 +377,7 @@ class bbcode_firstpass extends bbcode
{
if (!$this->check_bbcode('attachment', $in))
{
- return '';
+ return $in;
}
return '[attachment=' . $stx . ':' . $this->bbcode_uid . ']<!-- ia' . $stx . ' -->' . trim($in) . '<!-- ia' . $stx . ' -->[/attachment:' . $this->bbcode_uid . ']';
@@ -457,7 +457,7 @@ class bbcode_firstpass extends bbcode
{
if (!$this->check_bbcode('code', $in))
{
- return '';
+ return $in;
}
// We remove the hardcoded elements from the code block here because it is not used in code blocks
@@ -550,7 +550,7 @@ class bbcode_firstpass extends bbcode
{
if (!$this->check_bbcode('list', $in))
{
- return '';
+ return $in;
}
// $tok holds characters to stop at. Since the string starts with a '[' we'll get everything up to the first ']' which should be the opening [list] tag