aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-05-30 22:17:14 +0200
committerJoshyPHP <s9e.dev@gmail.com>2015-05-30 22:17:14 +0200
commit2f0d11ba3c28f27e535988de2a8d08f7b17aef92 (patch)
tree6f420430011a90e64d73ff858182206469f3714c /phpBB/phpbb
parent073f3e6fdc5af190db85b6cdefd418af4312af9f (diff)
downloadforums-2f0d11ba3c28f27e535988de2a8d08f7b17aef92.tar
forums-2f0d11ba3c28f27e535988de2a8d08f7b17aef92.tar.gz
forums-2f0d11ba3c28f27e535988de2a8d08f7b17aef92.tar.bz2
forums-2f0d11ba3c28f27e535988de2a8d08f7b17aef92.tar.xz
forums-2f0d11ba3c28f27e535988de2a8d08f7b17aef92.zip
[ticket/13901] Add more whitespace to long quotes for readability
PHPBB3-13901
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/textformatter/s9e/utils.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/utils.php b/phpBB/phpbb/textformatter/s9e/utils.php
index 04df589930..64fdb628ca 100644
--- a/phpBB/phpbb/textformatter/s9e/utils.php
+++ b/phpBB/phpbb/textformatter/s9e/utils.php
@@ -56,6 +56,7 @@ class utils implements \phpbb\textformatter\utils_interface
*/
public function generate_quote($text, array $attributes = array())
{
+ $text = trim($text);
$quote = '[quote';
if (isset($attributes['author']))
{
@@ -67,7 +68,9 @@ class utils implements \phpbb\textformatter\utils_interface
{
$quote .= ' ' . $name . '=' . $this->enquote($value);
}
- $quote .= ']' . $text . '[/quote]';
+ $quote .= ']';
+ $newline = (strlen($quote . $text . '[/quote]') > 80) ? "\n" : '';
+ $quote .= $newline . $text . $newline . '[/quote]';
return $quote;
}