Revert "Promote phutil-tag again"

This reverts commit 8fbabdc06d, reversing
changes made to 2dab1c1e42.
This commit is contained in:
epriestley
2013-02-13 14:08:57 -08:00
parent 8fbabdc06d
commit 73cce6e131
264 changed files with 1717 additions and 1691 deletions

View File

@@ -14,15 +14,12 @@ final class PhabricatorXHPASTViewFramesetController
$response = new AphrontWebpageResponse();
$response->setFrameable(true);
$response->setContent(hsprintf(
'<frameset cols="33%%, 34%%, 33%%">'.
'<frame src="/xhpast/input/%s/" />'.
'<frame src="/xhpast/tree/%s/" />'.
'<frame src="/xhpast/stream/%s/" />'.
'</frameset>',
$id,
$id,
$id));
$response->setContent(
'<frameset cols="33%, 34%, 33%">'.
'<frame src="/xhpast/input/'.$id.'/" />'.
'<frame src="/xhpast/tree/'.$id.'/" />'.
'<frame src="/xhpast/stream/'.$id.'/" />'.
'</frameset>');
return $response;
}

View File

@@ -5,6 +5,7 @@ final class PhabricatorXHPASTViewInputController
public function processRequest() {
$input = $this->getStorageTree()->getInput();
return $this->buildXHPASTViewPanelResponse($input);
return $this->buildXHPASTViewPanelResponse(
phutil_escape_html($input));
}
}

View File

@@ -20,7 +20,7 @@ abstract class PhabricatorXHPASTViewPanelController
}
protected function buildXHPASTViewPanelResponse($content) {
$content = hsprintf(
$content =
'<!DOCTYPE html>'.
'<html>'.
'<head>'.
@@ -57,9 +57,10 @@ li span {
</style>'.
'</head>'.
'<body>%s</body>'.
'</html>',
$content);
'<body>'.
$content.
'</body>'.
'</html>';
$response = new AphrontWebpageResponse();
$response->setFrameable(true);

View File

@@ -27,7 +27,6 @@ final class PhabricatorXHPASTViewStreamController
$token->getValue());
}
return $this->buildXHPASTViewPanelResponse(
phutil_implode_html('', $tokens));
return $this->buildXHPASTViewPanelResponse(implode('', $tokens));
}
}

View File

@@ -12,7 +12,7 @@ final class PhabricatorXHPASTViewTreeController
$input,
array(0, $stdout, ''));
$tree = phutil_tag('ul', array(), $this->buildTree($tree->getRootNode()));
$tree = '<ul>'.$this->buildTree($tree->getRootNode()).'</ul>';
return $this->buildXHPASTViewPanelResponse($tree);
}
@@ -27,19 +27,19 @@ final class PhabricatorXHPASTViewTreeController
}
$tree = array();
$tree[] = phutil_tag(
'li',
array(),
phutil_tag(
'span',
array(
'title' => $title,
),
$name));
$tree[] =
'<li>'.
phutil_tag(
'span',
array(
'title' => $title,
),
$name).
'</li>';
foreach ($root->getChildren() as $child) {
$tree[] = phutil_tag('ul', array(), $this->buildTree($child));
$tree[] = '<ul>'.$this->buildTree($child).'</ul>';
}
return phutil_implode_html("\n", $tree);
return implode("\n", $tree);
}
}