bbcode fixes

This commit is contained in:
flash 2016-10-11 14:28:15 +02:00
parent 80d73d130f
commit 6d88737776
2 changed files with 4 additions and 3 deletions

View file

@ -7,6 +7,7 @@
namespace Sakura\Controllers; namespace Sakura\Controllers;
use Sakura\BBCode\Parser as BBParser; use Sakura\BBCode\Parser as BBParser;
use Sakura\CurrentSession;
/** /**
* Helper controller. * Helper controller.
@ -21,6 +22,6 @@ class HelperController extends Controller
*/ */
public function bbcodeParse() public function bbcodeParse()
{ {
return BBParser::toHTML(htmlentities($_POST['text'] ?? '')); return BBParser::toHTML(htmlentities($_POST['text'] ?? ''), CurrentSession::$user);
} }
} }

View file

@ -940,7 +940,7 @@ class User
*/ */
public function userPage() 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() public function signature()
{ {
return BBCode\Parser::toHTML(htmlentities($this->signature)); return BBCode\Parser::toHTML(htmlentities($this->signature), $this);
} }
/** /**