This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/app/Controllers/HelperController.php
2016-10-11 14:28:15 +02:00

27 lines
523 B
PHP

<?php
/**
* Holds helpers for JavaScript.
* @package Sakura
*/
namespace Sakura\Controllers;
use Sakura\BBCode\Parser as BBParser;
use Sakura\CurrentSession;
/**
* Helper controller.
* @package Sakura
* @author Julian van de Groep <me@flash.moe>
*/
class HelperController extends Controller
{
/**
* Parsed BBcode from a post request.
* @return string
*/
public function bbcodeParse()
{
return BBParser::toHTML(htmlentities($_POST['text'] ?? ''), CurrentSession::$user);
}
}