Restore merge of phutil_tag.
This commit is contained in:
@@ -21,7 +21,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
||||
$title = 'Tag: '.$drequest->getSymbolicCommit();
|
||||
|
||||
$tag_view = new AphrontPanelView();
|
||||
$tag_view->setHeader(phutil_escape_html($title));
|
||||
$tag_view->setHeader($title);
|
||||
$tag_view->appendChild(
|
||||
$this->markupText($drequest->getTagContent()));
|
||||
|
||||
@@ -106,7 +106,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
||||
|
||||
private function markupText($text) {
|
||||
$engine = PhabricatorMarkupEngine::newDiffusionMarkupEngine();
|
||||
$text = phutil_safe_html($engine->markupText($text));
|
||||
$text = $engine->markupText($text);
|
||||
|
||||
$text = phutil_tag(
|
||||
'div',
|
||||
|
||||
@@ -97,8 +97,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
array(
|
||||
'class' => 'diffusion-commit-message phabricator-remarkup',
|
||||
),
|
||||
phutil_safe_html(
|
||||
$engine->markupText($commit_data->getCommitMessage()))));
|
||||
$engine->markupText($commit_data->getCommitMessage())));
|
||||
|
||||
$content[] = $top_anchor;
|
||||
$content[] = $headsup_view;
|
||||
@@ -449,9 +448,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
foreach ($parents as $parent) {
|
||||
$parent_links[] = $handles[$parent->getPHID()]->renderLink();
|
||||
}
|
||||
$props['Parents'] = array_interleave(
|
||||
" \xC2\xB7 ",
|
||||
$parent_links);
|
||||
$props['Parents'] = phutil_implode_html(" \xC2\xB7 ", $parent_links);
|
||||
}
|
||||
|
||||
$request = $this->getDiffusionRequest();
|
||||
@@ -488,7 +485,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
foreach ($task_phids as $phid) {
|
||||
$task_list[] = $handles[$phid]->renderLink();
|
||||
}
|
||||
$task_list = array_interleave(phutil_tag('br'), $task_list);
|
||||
$task_list = phutil_implode_html(phutil_tag('br'), $task_list);
|
||||
$props['Tasks'] = $task_list;
|
||||
}
|
||||
|
||||
@@ -497,7 +494,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
foreach ($proj_phids as $phid) {
|
||||
$proj_list[] = $handles[$phid]->renderLink();
|
||||
}
|
||||
$proj_list = array_interleave(phutil_tag('br'), $proj_list);
|
||||
$proj_list = phutil_implode_html(phutil_tag('br'), $proj_list);
|
||||
$props['Projects'] = $proj_list;
|
||||
}
|
||||
|
||||
@@ -689,7 +686,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
'inlineuri' => '/diffusion/inline/preview/'.$commit->getPHID().'/',
|
||||
));
|
||||
|
||||
$preview_panel =
|
||||
$preview_panel = hsprintf(
|
||||
'<div class="aphront-panel-preview aphront-panel-flush">
|
||||
<div id="audit-preview">
|
||||
<div class="aphront-panel-preview-loading-text">
|
||||
@@ -698,27 +695,24 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
</div>
|
||||
<div id="inline-comment-preview">
|
||||
</div>
|
||||
</div>';
|
||||
</div>');
|
||||
|
||||
// TODO: This is pretty awkward, unify the CSS between Diffusion and
|
||||
// Differential better.
|
||||
require_celerity_resource('differential-core-view-css');
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'id' => $pane_id,
|
||||
),
|
||||
phutil_render_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'differential-add-comment-panel',
|
||||
),
|
||||
hsprintf(
|
||||
'<div class="differential-add-comment-panel">%s%s%s</div>',
|
||||
id(new PhabricatorAnchorView())
|
||||
->setAnchorName('comment')
|
||||
->setNavigationMarker(true)
|
||||
->render().
|
||||
$panel->render().
|
||||
->render(),
|
||||
$panel->render(),
|
||||
$preview_panel));
|
||||
}
|
||||
|
||||
@@ -938,7 +932,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
$ref);
|
||||
}
|
||||
|
||||
return array_interleave(', ', $ref_links);
|
||||
return phutil_implode_html(', ', $ref_links);
|
||||
}
|
||||
|
||||
private function buildRawDiffResponse(DiffusionRequest $drequest) {
|
||||
|
||||
@@ -103,7 +103,7 @@ final class DiffusionExternalController extends DiffusionController {
|
||||
'href' => $href,
|
||||
),
|
||||
'r'.$repo->getCallsign().$commit->getCommitIdentifier()),
|
||||
phutil_escape_html($commit->loadCommitData()->getSummary()),
|
||||
$commit->loadCommitData()->getSummary(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ final class DiffusionHomeController extends DiffusionController {
|
||||
'href' => $shortcut->getHref(),
|
||||
),
|
||||
$shortcut->getName()),
|
||||
phutil_escape_html($shortcut->getDescription()),
|
||||
$shortcut->getDescription(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ final class DiffusionHomeController extends DiffusionController {
|
||||
'href' => '/diffusion/'.$repository->getCallsign().'/',
|
||||
),
|
||||
$repository->getName()),
|
||||
phutil_escape_html($repository->getDetail('description')),
|
||||
$repository->getDetail('description'),
|
||||
PhabricatorRepositoryType::getNameForRepositoryType(
|
||||
$repository->getVersionControlSystem()),
|
||||
$size,
|
||||
|
||||
@@ -71,11 +71,10 @@ final class DiffusionLintController extends DiffusionController {
|
||||
'<a href="%s">%s</a>',
|
||||
$drequest->generateURI(array('action' => 'lint')),
|
||||
$drequest->getCallsign()),
|
||||
phutil_escape_html(ArcanistLintSeverity::getStringForSeverity(
|
||||
$code['maxSeverity'])),
|
||||
phutil_escape_html($code['code']),
|
||||
phutil_escape_html($code['maxName']),
|
||||
phutil_escape_html($code['maxDescription']),
|
||||
ArcanistLintSeverity::getStringForSeverity($code['maxSeverity']),
|
||||
$code['code'],
|
||||
$code['maxName'],
|
||||
$code['maxDescription'],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,9 @@ final class DiffusionLintDetailsController extends DiffusionController {
|
||||
$rows[] = array(
|
||||
$path,
|
||||
$line,
|
||||
phutil_escape_html(ArcanistLintSeverity::getStringForSeverity(
|
||||
$message['severity'])),
|
||||
phutil_escape_html($message['name']),
|
||||
phutil_escape_html($message['description']),
|
||||
ArcanistLintSeverity::getStringForSeverity($message['severity']),
|
||||
$message['name'],
|
||||
$message['description'],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -71,7 +70,7 @@ final class DiffusionLintDetailsController extends DiffusionController {
|
||||
|
||||
$content[] = id(new AphrontPanelView())
|
||||
->setHeader(
|
||||
($lint != '' ? phutil_escape_html($lint)." \xC2\xB7 " : '').
|
||||
($lint != '' ? $lint." \xC2\xB7 " : '').
|
||||
pht('%d Lint Message(s)', count($messages)))
|
||||
->setCaption($link)
|
||||
->appendChild($table)
|
||||
|
||||
@@ -68,7 +68,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
'View Full Commit History');
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader("Recent Commits · {$all}");
|
||||
$panel->setHeader(hsprintf("Recent Commits · %s", $all));
|
||||
$panel->appendChild($history_table);
|
||||
$panel->setNoBackground();
|
||||
|
||||
@@ -125,9 +125,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
|
||||
$rows = array();
|
||||
foreach ($properties as $key => $value) {
|
||||
$rows[] = array(
|
||||
phutil_escape_html($key),
|
||||
phutil_escape_html($value));
|
||||
$rows[] = array($key, $value);
|
||||
}
|
||||
|
||||
$table = new AphrontTableView($rows);
|
||||
|
||||
@@ -81,8 +81,8 @@ final class DiffusionSymbolController extends DiffusionController {
|
||||
$project_name = '-';
|
||||
}
|
||||
|
||||
$file = phutil_escape_html($symbol->getPath());
|
||||
$line = phutil_escape_html($symbol->getLineNumber());
|
||||
$file = $symbol->getPath();
|
||||
$line = $symbol->getLineNumber();
|
||||
|
||||
$repo = $symbol->getRepository();
|
||||
if ($repo) {
|
||||
@@ -101,17 +101,17 @@ final class DiffusionSymbolController extends DiffusionController {
|
||||
),
|
||||
$file.':'.$line);
|
||||
} else if ($file) {
|
||||
$location = phutil_escape_html($file.':'.$line);
|
||||
$location = $file.':'.$line;
|
||||
} else {
|
||||
$location = '?';
|
||||
}
|
||||
|
||||
$rows[] = array(
|
||||
phutil_escape_html($symbol->getSymbolType()),
|
||||
phutil_escape_html($symbol->getSymbolContext()),
|
||||
phutil_escape_html($symbol->getSymbolName()),
|
||||
phutil_escape_html($symbol->getSymbolLanguage()),
|
||||
phutil_escape_html($project_name),
|
||||
$symbol->getSymbolType(),
|
||||
$symbol->getSymbolContext(),
|
||||
$symbol->getSymbolName(),
|
||||
$symbol->getSymbolLanguage(),
|
||||
$project_name,
|
||||
$location,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user