Convert Remarkup to safe HTML

Test Plan: None.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4919
This commit is contained in:
vrana
2013-02-11 23:42:37 -08:00
parent 5ad526942b
commit 718d22d607
19 changed files with 58 additions and 70 deletions

View File

@@ -41,7 +41,7 @@ final class PhabricatorMarkupEngine {
private $objects = array();
private $viewer;
private $version = 2;
private $version = 3;
/* -( Markup Pipeline )---------------------------------------------------- */
@@ -160,7 +160,7 @@ final class PhabricatorMarkupEngine {
"Call process() before getOutput().");
}
return new PhutilSafeHTML($this->objects[$key]['output']);
return $this->objects[$key]['output'];
}
@@ -424,7 +424,6 @@ final class PhabricatorMarkupEngine {
$rules[] = new PhabricatorRemarkupRuleMention();
$rules[] = new PhutilRemarkupRuleEscapeHTML();
$rules[] = new PhutilRemarkupRuleBold();
$rules[] = new PhutilRemarkupRuleItalic();
$rules[] = new PhutilRemarkupRuleDel();
@@ -450,7 +449,6 @@ final class PhabricatorMarkupEngine {
foreach ($blocks as $block) {
if ($block instanceof PhutilRemarkupEngineRemarkupLiteralBlockRule) {
$literal_rules = array();
$literal_rules[] = new PhutilRemarkupRuleEscapeHTML();
$literal_rules[] = new PhutilRemarkupRuleLinebreaks();
$block->setMarkupRules($literal_rules);
} else if (