mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
merge revisions #r8392 and #r8393
git-svn-id: file:///svn/phpbb/trunk@8394 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2cedbbac09
commit
0c5839a0b9
2 changed files with 15 additions and 12 deletions
|
@ -128,6 +128,8 @@
|
||||||
<li>[Fix] Do not rely on parameter returned by unlink() for verifying cache directory write permission (Bug #19565)</li>
|
<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] 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>[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>
|
||||||
|
<li>[Fix] Quote bbcode parsing adding too much closing tags on special conditions (Bug #20735)</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ class bbcode_firstpass extends bbcode
|
||||||
|
|
||||||
if (!$this->check_bbcode('size', $in))
|
if (!$this->check_bbcode('size', $in))
|
||||||
{
|
{
|
||||||
return '';
|
return $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['max_' . $this->mode . '_font_size'] && $config['max_' . $this->mode . '_font_size'] < $stx)
|
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))
|
if (!$this->check_bbcode('color', $in))
|
||||||
{
|
{
|
||||||
return '';
|
return $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '[color=' . $stx . ':' . $this->bbcode_uid . ']' . $in . '[/color:' . $this->bbcode_uid . ']';
|
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))
|
if (!$this->check_bbcode('u', $in))
|
||||||
{
|
{
|
||||||
return '';
|
return $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '[u:' . $this->bbcode_uid . ']' . $in . '[/u:' . $this->bbcode_uid . ']';
|
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))
|
if (!$this->check_bbcode('b', $in))
|
||||||
{
|
{
|
||||||
return '';
|
return $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '[b:' . $this->bbcode_uid . ']' . $in . '[/b:' . $this->bbcode_uid . ']';
|
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))
|
if (!$this->check_bbcode('i', $in))
|
||||||
{
|
{
|
||||||
return '';
|
return $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
return '[i:' . $this->bbcode_uid . ']' . $in . '[/i:' . $this->bbcode_uid . ']';
|
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))
|
if (!$this->check_bbcode('img', $in))
|
||||||
{
|
{
|
||||||
return '';
|
return $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
$in = trim($in);
|
$in = trim($in);
|
||||||
|
@ -340,7 +340,7 @@ class bbcode_firstpass extends bbcode
|
||||||
|
|
||||||
if (!$this->check_bbcode('flash', $in))
|
if (!$this->check_bbcode('flash', $in))
|
||||||
{
|
{
|
||||||
return '';
|
return $in;
|
||||||
}
|
}
|
||||||
|
|
||||||
$in = trim($in);
|
$in = trim($in);
|
||||||
|
@ -377,7 +377,7 @@ class bbcode_firstpass extends bbcode
|
||||||
{
|
{
|
||||||
if (!$this->check_bbcode('attachment', $in))
|
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 . ']';
|
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))
|
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
|
// 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))
|
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
|
// $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
|
||||||
|
@ -684,7 +684,8 @@ class bbcode_firstpass extends bbcode
|
||||||
* #14667 - [quote]test[/quote] test ] and [ test [quote]test[/quote] (correct: parsed)
|
* #14667 - [quote]test[/quote] test ] and [ test [quote]test[/quote] (correct: parsed)
|
||||||
* #14770 - [quote="["]test[/quote] (correct: parsed)
|
* #14770 - [quote="["]test[/quote] (correct: parsed)
|
||||||
* [quote="[i]test[/i]"]test[/quote] (correct: parsed)
|
* [quote="[i]test[/i]"]test[/quote] (correct: parsed)
|
||||||
* [quote="[quote]test[/quote]"]test[/quote] (correct: NOT parsed)
|
* [quote="[quote]test[/quote]"]test[/quote] (correct: parsed - Username displayed as [quote]test[/quote])
|
||||||
|
* #20735 - [quote]test[/[/b]quote] test [/quote][/quote] test - (correct: quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
|
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
|
||||||
|
@ -737,7 +738,7 @@ class bbcode_firstpass extends bbcode
|
||||||
$out .= ' ';
|
$out .= ' ';
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
else if (preg_match('#^quote(?:="(.*?)")?$#is', $buffer, $m))
|
else if (preg_match('#^quote(?:="(.*?)")?$#is', $buffer, $m) && substr($out, -1, 1) == '[')
|
||||||
{
|
{
|
||||||
$this->parsed_items['quote']++;
|
$this->parsed_items['quote']++;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue