1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-16 03:42:41 +01:00
phorge-phorge/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php

29 lines
639 B
PHP
Raw Normal View History

<?php
/**
* @group maniphest
*/
final class ManiphestTaskDescriptionPreviewController
extends ManiphestController {
public function processRequest() {
$request = $this->getRequest();
$description = $request->getStr('description');
$task = new ManiphestTask();
$task->setDescription($description);
$output = PhabricatorMarkupEngine::renderOneObject(
$task,
ManiphestTask::MARKUP_FIELD_DESCRIPTION,
$request->getUser());
2013-02-13 23:50:15 +01:00
$content = hsprintf(
'<div class="phabricator-remarkup">%s</div>',
$output);
return id(new AphrontAjaxResponse())
->setContent($content);
}
}