ImageConverter fix

This commit is contained in:
buddha87 2016-05-21 01:52:17 +02:00
parent 95596db15d
commit 6a57fc96bd
2 changed files with 2 additions and 3 deletions

View File

@ -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.

View File

@ -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);