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

28 lines
523 B
PHP
Raw Normal View History

2016-03-25 01:31:57 +00:00
<?php
/**
* Holds helpers for JavaScript.
* @package Sakura
*/
namespace Sakura\Controllers;
2016-08-06 17:31:32 +00:00
use Sakura\BBCode\Parser as BBParser;
2016-10-11 12:28:15 +00:00
use Sakura\CurrentSession;
2016-03-25 01:31:57 +00:00
/**
* Helper controller.
* @package Sakura
* @author Julian van de Groep <me@flash.moe>
*/
class HelperController extends Controller
{
2016-03-27 21:18:57 +00:00
/**
2016-08-05 02:35:37 +00:00
* Parsed BBcode from a post request.
* @return string
2016-03-27 21:18:57 +00:00
*/
2016-03-25 01:31:57 +00:00
public function bbcodeParse()
{
2016-10-11 12:28:15 +00:00
return BBParser::toHTML(htmlentities($_POST['text'] ?? ''), CurrentSession::$user);
2016-03-25 01:31:57 +00:00
}
}