Revert "Promote phutil-tag again"
This reverts commit8fbabdc06d, reversing changes made to2dab1c1e42.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -27,7 +27,6 @@ final class PhabricatorXHPASTViewStreamController
|
||||
$token->getValue());
|
||||
}
|
||||
|
||||
return $this->buildXHPASTViewPanelResponse(
|
||||
phutil_implode_html('', $tokens));
|
||||
return $this->buildXHPASTViewPanelResponse(implode('', $tokens));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user