mirror of
https://github.com/humhub/humhub.git
synced 2025-01-18 06:38:14 +01:00
ImageConverter fix
This commit is contained in:
parent
95596db15d
commit
6a57fc96bd
@ -20,7 +20,7 @@
|
||||
|
||||
namespace humhub\modules\file\libs;
|
||||
|
||||
use humhub\models\Setting;
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* ImageConverter provides a simple interface for converting or resizing images.
|
||||
|
@ -99,8 +99,6 @@ class RichText extends \humhub\components\Widget
|
||||
if ($this->maxLength != 0) {
|
||||
$this->text = \humhub\libs\Helpers::truncateText($this->text, $this->maxLength);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!$this->minimal) {
|
||||
$output = nl2br($this->text);
|
||||
@ -109,6 +107,7 @@ class RichText extends \humhub\components\Widget
|
||||
$output = $this->text;
|
||||
}
|
||||
|
||||
// replace leading spaces with no break spaces to keep the text format
|
||||
$output = preg_replace_callback('/^( +)/m', function($m) {
|
||||
return str_repeat(" ", strlen($m[1]));
|
||||
}, $output);
|
||||
|
Loading…
x
Reference in New Issue
Block a user