From 6d887377761ff2cb4b9c55f3a0b48b99e487053b Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 11 Oct 2016 14:28:15 +0200 Subject: [PATCH] bbcode fixes --- app/Controllers/HelperController.php | 3 ++- app/User.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Controllers/HelperController.php b/app/Controllers/HelperController.php index fe147ec..b06c7a1 100644 --- a/app/Controllers/HelperController.php +++ b/app/Controllers/HelperController.php @@ -7,6 +7,7 @@ namespace Sakura\Controllers; use Sakura\BBCode\Parser as BBParser; +use Sakura\CurrentSession; /** * Helper controller. @@ -21,6 +22,6 @@ class HelperController extends Controller */ public function bbcodeParse() { - return BBParser::toHTML(htmlentities($_POST['text'] ?? '')); + return BBParser::toHTML(htmlentities($_POST['text'] ?? ''), CurrentSession::$user); } } diff --git a/app/User.php b/app/User.php index 1a59e9e..4405bf2 100644 --- a/app/User.php +++ b/app/User.php @@ -940,7 +940,7 @@ class User */ public function userPage() { - return BBCode\Parser::toHTML(htmlentities($this->page)); + return BBCode\Parser::toHTML(htmlentities($this->page), $this); } /** @@ -949,7 +949,7 @@ class User */ public function signature() { - return BBCode\Parser::toHTML(htmlentities($this->signature)); + return BBCode\Parser::toHTML(htmlentities($this->signature), $this); } /**