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); } /**