mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
Convert phutil_render_tag(X, Y, phutil_escape_html(Z)) to phutil_tag
Summary: Created with spatch: lang=diff - phutil_render_tag + phutil_tag (X, Y, - phutil_escape_html( Z - ) ) Test Plan: Loaded homepage Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4501
This commit is contained in:
parent
f8dbfdd59d
commit
48561a8b1f
84 changed files with 225 additions and 231 deletions
|
@ -333,17 +333,17 @@ class AphrontDefaultApplicationConfiguration
|
|||
'$'.$part['line'];
|
||||
$attrs['target'] = '_blank';
|
||||
}
|
||||
$file_name = phutil_render_tag(
|
||||
$file_name = phutil_tag(
|
||||
'a',
|
||||
$attrs,
|
||||
phutil_escape_html($relative));
|
||||
$relative);
|
||||
} else {
|
||||
$file_name = phutil_render_tag(
|
||||
$file_name = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'title' => $file,
|
||||
),
|
||||
phutil_escape_html($relative));
|
||||
$relative);
|
||||
}
|
||||
$file_name = $file_name.' : '.(int)$part['line'];
|
||||
} else {
|
||||
|
|
|
@ -39,12 +39,12 @@ final class DarkConsoleErrorLogPlugin extends DarkConsolePlugin {
|
|||
$file = $row['file'];
|
||||
$line = $row['line'];
|
||||
|
||||
$tag = phutil_render_tag(
|
||||
$tag = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'onclick' => jsprintf('show_details(%d)', $index),
|
||||
),
|
||||
phutil_escape_html($row['str'].' at ['.basename($file).':'.$line.']'));
|
||||
$row['str'].' at ['.basename($file).':'.$line.']');
|
||||
$rows[] = array($tag);
|
||||
|
||||
$details .=
|
||||
|
@ -70,12 +70,12 @@ final class DarkConsoleErrorLogPlugin extends DarkConsolePlugin {
|
|||
}
|
||||
}
|
||||
|
||||
$details .= phutil_render_tag(
|
||||
$details .= phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
),
|
||||
phutil_escape_html($line));
|
||||
$line);
|
||||
$details .= "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -16,12 +16,12 @@ final class PhabricatorChatLogChannelListController
|
|||
foreach ($channels as $channel) {
|
||||
$name = $channel['channel'];
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/chatlog/channel/'.phutil_escape_uri($name).'/',
|
||||
),
|
||||
phutil_escape_html($name)));
|
||||
$name));
|
||||
}
|
||||
|
||||
$table = new AphrontTableView($rows);
|
||||
|
|
|
@ -25,12 +25,12 @@ final class PhabricatorConduitListController
|
|||
|
||||
$rows[] = array(
|
||||
$group,
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/conduit/method/'.$info['full_name'],
|
||||
),
|
||||
phutil_escape_html($info['full_name'])),
|
||||
$info['full_name']),
|
||||
$info['description'],
|
||||
$status,
|
||||
);
|
||||
|
|
|
@ -24,12 +24,12 @@ final class PhabricatorConfigAllController
|
|||
}
|
||||
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->getApplicationURI('edit/'.$key.'/'),
|
||||
),
|
||||
phutil_escape_html($key)),
|
||||
$key),
|
||||
$value,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -95,12 +95,12 @@ final class PhabricatorSetupIssueView extends AphrontView {
|
|||
),
|
||||
pht('To continue, resolve this problem and reload the page.'));
|
||||
|
||||
$name = phutil_render_tag(
|
||||
$name = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'setup-issue-name',
|
||||
),
|
||||
phutil_escape_html($issue->getName()));
|
||||
$issue->getName());
|
||||
|
||||
return phutil_render_tag(
|
||||
'div',
|
||||
|
@ -283,10 +283,10 @@ final class PhabricatorSetupIssueView extends AphrontView {
|
|||
"To update these %d value(s), edit your PHP configuration file, ".
|
||||
"located here:",
|
||||
count($configs)));
|
||||
$info .= phutil_render_tag(
|
||||
$info .= phutil_tag(
|
||||
'pre',
|
||||
array(),
|
||||
phutil_escape_html($ini_loc));
|
||||
$ini_loc);
|
||||
}
|
||||
|
||||
if ($more_loc) {
|
||||
|
@ -296,10 +296,10 @@ final class PhabricatorSetupIssueView extends AphrontView {
|
|||
pht(
|
||||
"PHP also loaded these configuration file(s):",
|
||||
count($more_loc)));
|
||||
$info .= phutil_render_tag(
|
||||
$info .= phutil_tag(
|
||||
'pre',
|
||||
array(),
|
||||
phutil_escape_html(implode("\n", $more_loc)));
|
||||
implode("\n", $more_loc));
|
||||
}
|
||||
|
||||
$info .= phutil_render_tag(
|
||||
|
|
|
@ -48,12 +48,12 @@ final class PhabricatorCountdownListController
|
|||
$rows[] = array(
|
||||
phutil_escape_html($timer->getID()),
|
||||
$handles[$timer->getAuthorPHID()]->renderLink(),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/countdown/'.$timer->getID().'/',
|
||||
),
|
||||
phutil_escape_html($timer->getTitle())),
|
||||
$timer->getTitle()),
|
||||
phabricator_datetime($timer->getDatepoint(), $user),
|
||||
$edit_button,
|
||||
$delete_button,
|
||||
|
|
|
@ -69,12 +69,12 @@ final class PhabricatorDaemonLogEventsView extends AphrontView {
|
|||
if ($this->combinedLog) {
|
||||
array_unshift(
|
||||
$row,
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/daemon/log/'.$event->getLogID().'/',
|
||||
),
|
||||
phutil_escape_html('Daemon '.$event->getLogID())));
|
||||
'Daemon '.$event->getLogID()));
|
||||
}
|
||||
|
||||
$rows[] = $row;
|
||||
|
|
|
@ -19,12 +19,12 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
if ($diff->getRevisionID()) {
|
||||
$top_panel = new AphrontPanelView();
|
||||
$top_panel->setWidth(AphrontPanelView::WIDTH_WIDE);
|
||||
$link = phutil_render_tag(
|
||||
$link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => PhabricatorEnv::getURI('/D'.$diff->getRevisionID()),
|
||||
),
|
||||
phutil_escape_html('D'.$diff->getRevisionID()));
|
||||
'D'.$diff->getRevisionID());
|
||||
$top_panel->appendChild(
|
||||
"<h1>".pht('This diff belongs to revision %s', $link)."</h1>");
|
||||
} else {
|
||||
|
@ -52,12 +52,12 @@ final class DifferentialDiffViewController extends DifferentialController {
|
|||
if ($revisions) {
|
||||
$select[] = '<optgroup label="'.pht('Update Existing Revision').'">';
|
||||
foreach ($revisions as $revision) {
|
||||
$select[] = phutil_render_tag(
|
||||
$select[] = phutil_tag(
|
||||
'option',
|
||||
array(
|
||||
'value' => $revision->getID(),
|
||||
),
|
||||
phutil_escape_html($revision->getTitle()));
|
||||
$revision->getTitle());
|
||||
}
|
||||
$select[] = '</optgroup>';
|
||||
}
|
||||
|
|
|
@ -87,12 +87,12 @@ final class DifferentialTitleFieldSpecification
|
|||
}
|
||||
|
||||
public function renderValueForRevisionList(DifferentialRevision $revision) {
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/D'.$revision->getID(),
|
||||
),
|
||||
phutil_escape_html($revision->getTitle()));
|
||||
$revision->getTitle());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -97,12 +97,12 @@ final class DifferentialChangesetFileTreeSideNavBuilder {
|
|||
),
|
||||
'');
|
||||
|
||||
$name_element = phutil_render_tag(
|
||||
$name_element = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-filetree-name',
|
||||
),
|
||||
phutil_escape_html($name));
|
||||
$name);
|
||||
|
||||
$filetree[] = javelin_render_tag(
|
||||
$href ? 'a' : 'span',
|
||||
|
|
|
@ -145,10 +145,10 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
|||
}
|
||||
$last_base = $base;
|
||||
|
||||
$id_link = phutil_render_tag(
|
||||
$id_link = phutil_tag(
|
||||
'a',
|
||||
array('href' => '/differential/diff/'.$id.'/'),
|
||||
phutil_escape_html($id));
|
||||
$id);
|
||||
$rows[] =
|
||||
'<tr'.$class.'>'.
|
||||
'<td class="revhistory-name">'.phutil_escape_html($name).'</td>'.
|
||||
|
@ -179,7 +179,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
|||
|
||||
$select = '<select name="whitespace">';
|
||||
foreach ($options as $value => $label) {
|
||||
$select .= phutil_render_tag(
|
||||
$select .= phutil_tag(
|
||||
'option',
|
||||
array(
|
||||
'value' => $value,
|
||||
|
@ -187,7 +187,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
|
|||
? 'selected'
|
||||
: null,
|
||||
),
|
||||
phutil_escape_html($label));
|
||||
$label);
|
||||
}
|
||||
$select .= '</select>';
|
||||
|
||||
|
|
|
@ -178,12 +178,12 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
case 'plain':
|
||||
$style =
|
||||
"margin: 1em 2em; width: 90%; height: 80em; font-family: monospace";
|
||||
$corpus = phutil_render_tag(
|
||||
$corpus = phutil_tag(
|
||||
'textarea',
|
||||
array(
|
||||
'style' => $style,
|
||||
),
|
||||
phutil_escape_html($file_query->getRawData()));
|
||||
$file_query->getRawData());
|
||||
|
||||
break;
|
||||
|
||||
|
@ -205,12 +205,12 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
sprintf("%-10s %-20s %s", substr($rev, 0, 7), $author, $line);
|
||||
}
|
||||
|
||||
$corpus = phutil_render_tag(
|
||||
$corpus = phutil_tag(
|
||||
'textarea',
|
||||
array(
|
||||
'style' => $style,
|
||||
),
|
||||
phutil_escape_html(implode("\n", $rows)));
|
||||
implode("\n", $rows));
|
||||
|
||||
break;
|
||||
|
||||
|
@ -493,11 +493,11 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
if (isset($blame['handle'])) {
|
||||
$author_link = $blame['handle']->renderLink();
|
||||
} else {
|
||||
$author_link = phutil_render_tag(
|
||||
$author_link = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
),
|
||||
phutil_escape_html($blame['author']));
|
||||
$blame['author']);
|
||||
}
|
||||
$display_line['author'] = $author_link;
|
||||
|
||||
|
@ -699,12 +699,12 @@ final class DiffusionBrowseFileController extends DiffusionController {
|
|||
idx($line, 'author'));
|
||||
}
|
||||
|
||||
$line_link = phutil_render_tag(
|
||||
$line_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $line_href,
|
||||
),
|
||||
phutil_escape_html($line['line']));
|
||||
$line['line']);
|
||||
|
||||
$blame[] = javelin_render_tag(
|
||||
'th',
|
||||
|
|
|
@ -14,7 +14,7 @@ final class DiffusionCommitBranchesController extends DiffusionController {
|
|||
|
||||
$branch_links = array();
|
||||
foreach ($branches as $branch => $commit) {
|
||||
$branch_links[] = phutil_render_tag(
|
||||
$branch_links[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $request->generateURI(
|
||||
|
@ -23,7 +23,7 @@ final class DiffusionCommitBranchesController extends DiffusionController {
|
|||
'branch' => $branch,
|
||||
)),
|
||||
),
|
||||
phutil_escape_html($branch));
|
||||
$branch);
|
||||
}
|
||||
|
||||
return id(new AphrontAjaxResponse())
|
||||
|
|
|
@ -178,13 +178,13 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
$change_panel->setID('toc');
|
||||
|
||||
if ($count > self::CHANGES_LIMIT) {
|
||||
$show_all_button = phutil_render_tag(
|
||||
$show_all_button = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'class' => 'button green',
|
||||
'href' => '?show_all=true',
|
||||
),
|
||||
phutil_escape_html('Show All Changes'));
|
||||
'Show All Changes');
|
||||
$warning_view = id(new AphrontErrorView())
|
||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING)
|
||||
->setTitle('Very Large Commit')
|
||||
|
@ -399,10 +399,10 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
if ($commit->getAuditStatus()) {
|
||||
$status = PhabricatorAuditCommitStatusConstants::getStatusName(
|
||||
$commit->getAuditStatus());
|
||||
$props['Status'] = phutil_render_tag(
|
||||
$props['Status'] = phutil_tag(
|
||||
'strong',
|
||||
array(),
|
||||
phutil_escape_html($status));
|
||||
$status);
|
||||
}
|
||||
|
||||
$props['Committed'] = phabricator_datetime($commit->getEpoch(), $user);
|
||||
|
@ -892,7 +892,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
|
||||
$ref_links = array();
|
||||
foreach ($refs as $ref) {
|
||||
$ref_links[] = phutil_render_tag(
|
||||
$ref_links[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $request->generateURI(
|
||||
|
@ -901,7 +901,7 @@ final class DiffusionCommitController extends DiffusionController {
|
|||
'branch' => $ref,
|
||||
)),
|
||||
),
|
||||
phutil_escape_html($ref));
|
||||
$ref);
|
||||
}
|
||||
$ref_links = implode(', ', $ref_links);
|
||||
return $ref_links;
|
||||
|
|
|
@ -19,7 +19,7 @@ final class DiffusionCommitTagsController extends DiffusionController {
|
|||
|
||||
$tag_links = array();
|
||||
foreach ($tags as $tag) {
|
||||
$tag_links[] = phutil_render_tag(
|
||||
$tag_links[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $request->generateURI(
|
||||
|
@ -28,7 +28,7 @@ final class DiffusionCommitTagsController extends DiffusionController {
|
|||
'commit' => $tag->getName(),
|
||||
)),
|
||||
),
|
||||
phutil_escape_html($tag->getName()));
|
||||
$tag->getName());
|
||||
}
|
||||
|
||||
if ($has_more_tags) {
|
||||
|
|
|
@ -278,7 +278,7 @@ abstract class DiffusionController extends PhabricatorController {
|
|||
$thus_far = '';
|
||||
foreach ($path_parts as $path_part) {
|
||||
$thus_far .= $path_part.'/';
|
||||
$path_sections[] = phutil_render_tag(
|
||||
$path_sections[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $drequest->generateURI(
|
||||
|
@ -286,7 +286,7 @@ abstract class DiffusionController extends PhabricatorController {
|
|||
'path' => $thus_far,
|
||||
) + $uri_params),
|
||||
),
|
||||
phutil_escape_html($path_part));
|
||||
$path_part);
|
||||
}
|
||||
|
||||
$path_sections[] = phutil_escape_html($last);
|
||||
|
|
|
@ -95,13 +95,12 @@ final class DiffusionExternalController extends DiffusionController {
|
|||
'commit' => $commit->getCommitIdentifier(),
|
||||
));
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
),
|
||||
phutil_escape_html(
|
||||
'r'.$repo->getCallsign().$commit->getCommitIdentifier())),
|
||||
'r'.$repo->getCallsign().$commit->getCommitIdentifier()),
|
||||
phutil_escape_html($commit->loadCommitData()->getSummary()),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -47,13 +47,13 @@ final class DiffusionHistoryController extends DiffusionController {
|
|||
$copies_new = true;
|
||||
}
|
||||
|
||||
$button = phutil_render_tag(
|
||||
$button = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'class' => 'button small grey',
|
||||
'href' => $request->getRequestURI()->alter('copies', $copies_new),
|
||||
),
|
||||
phutil_escape_html($button_title));
|
||||
$button_title);
|
||||
|
||||
$history_table = new DiffusionHistoryTableView();
|
||||
$history_table->setUser($request->getUser());
|
||||
|
|
|
@ -13,12 +13,12 @@ final class DiffusionHomeController extends DiffusionController {
|
|||
$rows = array();
|
||||
foreach ($shortcuts as $shortcut) {
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $shortcut->getHref(),
|
||||
),
|
||||
phutil_escape_html($shortcut->getName())),
|
||||
$shortcut->getName()),
|
||||
phutil_escape_html($shortcut->getDescription()),
|
||||
);
|
||||
}
|
||||
|
@ -124,12 +124,12 @@ final class DiffusionHomeController extends DiffusionController {
|
|||
}
|
||||
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/diffusion/'.$repository->getCallsign().'/',
|
||||
),
|
||||
phutil_escape_html($repository->getName())),
|
||||
$repository->getName()),
|
||||
phutil_escape_html($repository->getDetail('description')),
|
||||
PhabricatorRepositoryType::getNameForRepositoryType(
|
||||
$repository->getVersionControlSystem()),
|
||||
|
|
|
@ -94,12 +94,12 @@ final class DiffusionSymbolController extends DiffusionController {
|
|||
return id(new AphrontRedirectResponse())->setURI($href);
|
||||
}
|
||||
|
||||
$location = phutil_render_tag(
|
||||
$location = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
),
|
||||
phutil_escape_html($file.':'.$line));
|
||||
$file.':'.$line);
|
||||
} else if ($file) {
|
||||
$location = phutil_escape_html($file.':'.$line);
|
||||
} else {
|
||||
|
|
|
@ -47,7 +47,7 @@ final class DiffusionBranchTableView extends DiffusionView {
|
|||
),
|
||||
'History'
|
||||
),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $drequest->generateURI(
|
||||
|
@ -56,7 +56,7 @@ final class DiffusionBranchTableView extends DiffusionView {
|
|||
'branch' => $branch->getName(),
|
||||
)),
|
||||
),
|
||||
phutil_escape_html($branch->getName())),
|
||||
$branch->getName()),
|
||||
self::linkCommit(
|
||||
$drequest->getRepository(),
|
||||
$branch->getHeadCommitIdentifier()),
|
||||
|
|
|
@ -278,12 +278,12 @@ final class DiffusionBrowseTableView extends DiffusionView {
|
|||
|
||||
require_celerity_resource('diffusion-icons-css');
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'diffusion-path-icon diffusion-path-icon-'.$type,
|
||||
),
|
||||
phutil_escape_html($text));
|
||||
$text);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ final class DiffusionTagListView extends DiffusionView {
|
|||
foreach ($this->tags as $tag) {
|
||||
$commit = idx($this->commits, $tag->getCommitIdentifier());
|
||||
|
||||
$tag_link = phutil_render_tag(
|
||||
$tag_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $drequest->generateURI(
|
||||
|
@ -43,9 +43,9 @@ final class DiffusionTagListView extends DiffusionView {
|
|||
'commit' => $tag->getName(),
|
||||
)),
|
||||
),
|
||||
phutil_escape_html($tag->getName()));
|
||||
$tag->getName());
|
||||
|
||||
$commit_link = phutil_render_tag(
|
||||
$commit_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $drequest->generateURI(
|
||||
|
@ -54,9 +54,8 @@ final class DiffusionTagListView extends DiffusionView {
|
|||
'commit' => $tag->getCommitIdentifier(),
|
||||
)),
|
||||
),
|
||||
phutil_escape_html(
|
||||
$repository->formatCommitName(
|
||||
$tag->getCommitIdentifier())));
|
||||
$tag->getCommitIdentifier()));
|
||||
|
||||
$author = null;
|
||||
if ($commit && $commit->getAuthorPHID()) {
|
||||
|
|
|
@ -33,13 +33,13 @@ final class DivinerListController extends PhabricatorController {
|
|||
$name = $link['name'];
|
||||
$flavor = $link['flavor'];
|
||||
|
||||
$link = phutil_render_tag(
|
||||
$link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'target' => '_blank',
|
||||
),
|
||||
phutil_escape_html($name));
|
||||
$name);
|
||||
|
||||
$out[] =
|
||||
'<div class="aphront-directory-item">'.
|
||||
|
|
|
@ -32,18 +32,18 @@ abstract class DrydockController extends PhabricatorController {
|
|||
$lease_uri = $this->getApplicationURI($lease_uri);
|
||||
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $resource_uri,
|
||||
),
|
||||
phutil_escape_html($log->getResourceID())),
|
||||
phutil_render_tag(
|
||||
$log->getResourceID()),
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $lease_uri,
|
||||
),
|
||||
phutil_escape_html($log->getLeaseID())),
|
||||
$log->getLeaseID()),
|
||||
phutil_escape_html($log->getMessage()),
|
||||
phabricator_date($log->getEpoch(), $user),
|
||||
);
|
||||
|
@ -96,12 +96,12 @@ abstract class DrydockController extends PhabricatorController {
|
|||
$resource_name = $resource->getName();
|
||||
|
||||
$item->addAttribute(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $resource_href,
|
||||
),
|
||||
phutil_escape_html($resource_name)));
|
||||
$resource_name));
|
||||
}
|
||||
|
||||
$status = DrydockLeaseStatus::getNameForStatus($lease->getStatus());
|
||||
|
|
|
@ -45,12 +45,12 @@ final class PhabricatorFeedBuilder {
|
|||
}
|
||||
$last_date = $date;
|
||||
$null_view->appendChild(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-feed-story-date',
|
||||
),
|
||||
phutil_escape_html($date)));
|
||||
$date));
|
||||
}
|
||||
|
||||
$view = $story->renderView();
|
||||
|
|
|
@ -233,13 +233,13 @@ abstract class PhabricatorFeedStory implements PhabricatorPolicyInterface {
|
|||
// NOTE: We render our own link here to customize the styling and add
|
||||
// the '_top' target for framed feeds.
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $handle->getURI(),
|
||||
'target' => $this->framed ? '_top' : null,
|
||||
),
|
||||
phutil_escape_html($handle->getLinkName()));
|
||||
$handle->getLinkName());
|
||||
}
|
||||
|
||||
final protected function renderString($str) {
|
||||
|
|
|
@ -481,12 +481,12 @@ final class HeraldTranscriptController extends HeraldController {
|
|||
}
|
||||
|
||||
if (strlen($value) > 256) {
|
||||
$value = phutil_render_tag(
|
||||
$value = phutil_tag(
|
||||
'textarea',
|
||||
array(
|
||||
'class' => 'herald-field-value-transcript',
|
||||
),
|
||||
phutil_escape_html($value));
|
||||
$value);
|
||||
} else if ($name === 'Object Link') {
|
||||
// The link cannot be escaped
|
||||
} else {
|
||||
|
|
|
@ -25,10 +25,10 @@ final class HeraldRuleEditHistoryView extends AphrontView {
|
|||
|
||||
foreach ($this->edits as $edit) {
|
||||
$name = nonempty($edit->getRuleName(), 'Unknown Rule');
|
||||
$rule_name = phutil_render_tag(
|
||||
$rule_name = phutil_tag(
|
||||
'strong',
|
||||
array(),
|
||||
phutil_escape_html($name));
|
||||
$name);
|
||||
|
||||
switch ($edit->getAction()) {
|
||||
case 'create':
|
||||
|
|
|
@ -44,12 +44,12 @@ final class HeraldRuleListView extends AphrontView {
|
|||
$author = $this->handles[$rule->getAuthorPHID()]->renderLink();
|
||||
}
|
||||
|
||||
$name = phutil_render_tag(
|
||||
$name = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/herald/rule/'.$rule->getID().'/',
|
||||
),
|
||||
phutil_escape_html($rule->getName()));
|
||||
$rule->getName());
|
||||
|
||||
$edit_log = phutil_render_tag(
|
||||
'a',
|
||||
|
|
|
@ -478,12 +478,12 @@ final class ManiphestReportController extends ManiphestController {
|
|||
}
|
||||
|
||||
$tasks = idx($result, $handle->getPHID(), array());
|
||||
$name = phutil_render_tag(
|
||||
$name = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $base_link.$handle->getPHID(),
|
||||
),
|
||||
phutil_escape_html($handle->getName()));
|
||||
$handle->getName());
|
||||
$closed = idx($result_closed, $handle->getPHID(), array());
|
||||
} else {
|
||||
$tasks = $leftover;
|
||||
|
@ -524,13 +524,13 @@ final class ManiphestReportController extends ManiphestController {
|
|||
|
||||
if ($closed) {
|
||||
$task_ids = implode(',', mpull($closed, 'getID'));
|
||||
$row[] = phutil_render_tag(
|
||||
$row[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/maniphest/view/custom/?s=oc&tasks='.$task_ids,
|
||||
'target' => '_blank',
|
||||
),
|
||||
phutil_escape_html(number_format(count($closed))));
|
||||
number_format(count($closed)));
|
||||
} else {
|
||||
$row[] = '-';
|
||||
}
|
||||
|
|
|
@ -48,12 +48,12 @@ final class ManiphestSavedQueryListController extends ManiphestController {
|
|||
'value' => $query->getID(),
|
||||
'checked' => ($query->getIsDefault() ? 'checked' : null),
|
||||
)),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/maniphest/view/custom/?key='.$query->getQueryKey(),
|
||||
),
|
||||
phutil_escape_html($query->getName())),
|
||||
$query->getName()),
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
|
|
|
@ -457,12 +457,12 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
|||
$subject = '[T'.$task->getID().'] '.$task->getTitle();
|
||||
$view->addProperty(
|
||||
pht('From Email'),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => 'mailto:'.$source.'?subject='.$subject
|
||||
),
|
||||
phutil_escape_html($source)));
|
||||
$source));
|
||||
}
|
||||
|
||||
$view->addProperty(
|
||||
|
|
|
@ -21,14 +21,13 @@ final class ManiphestTaskProjectsView extends ManiphestView {
|
|||
|
||||
$tags = array();
|
||||
foreach ($show as $handle) {
|
||||
$tags[] = phutil_render_tag(
|
||||
$tags[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $handle->getURI(),
|
||||
'class' => 'phabricator-project-tag',
|
||||
),
|
||||
phutil_escape_html(
|
||||
phutil_utf8_shorten($handle->getName(), 24)));
|
||||
phutil_utf8_shorten($handle->getName(), 24));
|
||||
}
|
||||
|
||||
if (count($this->handles) > 2) {
|
||||
|
|
|
@ -119,12 +119,12 @@ final class ManiphestTaskSummaryView extends ManiphestView {
|
|||
: '<em>None</em>').
|
||||
'</td>'.
|
||||
'<td class="maniphest-task-name">'.
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/T'.$task->getID(),
|
||||
),
|
||||
phutil_escape_html($task->getTitle())).
|
||||
$task->getTitle()).
|
||||
'</td>'.
|
||||
'<td class="maniphest-task-projects">'.
|
||||
$projects_view->render().
|
||||
|
|
|
@ -31,12 +31,12 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
$icon = null;
|
||||
$create_button = null;
|
||||
if ($application) {
|
||||
$content[] = phutil_render_tag(
|
||||
$content[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-launch-name',
|
||||
),
|
||||
phutil_escape_html($application->getName()));
|
||||
$application->getName());
|
||||
|
||||
if ($application->isBeta()) {
|
||||
$content[] = phutil_render_tag(
|
||||
|
@ -48,12 +48,12 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
}
|
||||
|
||||
if ($this->fullWidth) {
|
||||
$content[] = phutil_render_tag(
|
||||
$content[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-launch-description',
|
||||
),
|
||||
phutil_escape_html($application->getShortDescription()));
|
||||
$application->getShortDescription());
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
|
@ -64,12 +64,12 @@ final class PhabricatorApplicationLaunchView extends AphrontView {
|
|||
}
|
||||
|
||||
if ($count) {
|
||||
$content[] = phutil_render_tag(
|
||||
$content[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-application-launch-attention',
|
||||
),
|
||||
phutil_escape_html($count));
|
||||
$count);
|
||||
}
|
||||
|
||||
$classes = array();
|
||||
|
|
|
@ -37,12 +37,12 @@ final class PhabricatorApplicationStatusView extends AphrontView {
|
|||
'phabricator-application-status-type-'.$this->type,
|
||||
);
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => implode(' ', $classes),
|
||||
),
|
||||
phutil_escape_html($this->text));
|
||||
$this->text);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,10 +42,10 @@ final class PhabricatorMetaMTAWorker
|
|||
}
|
||||
|
||||
public function renderForDisplay() {
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'a',
|
||||
array('href' => '/mail/view/'.$this->getTaskData().'/'),
|
||||
phutil_escape_html($this->getTaskData()));
|
||||
$this->getTaskData());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,21 +31,21 @@ extends PhabricatorOAuthClientBaseController {
|
|||
$highlight = $this->getHighlightPHIDs();
|
||||
foreach ($clients as $client) {
|
||||
$row = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $client->getViewURI(),
|
||||
),
|
||||
phutil_escape_html($client->getName())
|
||||
$client->getName()
|
||||
),
|
||||
$client->getPHID(),
|
||||
$client->getSecret(),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $client->getRedirectURI(),
|
||||
),
|
||||
phutil_escape_html($client->getRedirectURI())
|
||||
$client->getRedirectURI()
|
||||
),
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
|
|
|
@ -61,12 +61,12 @@ extends PhabricatorOAuthClientAuthorizationBaseController {
|
|||
id(new AphrontFormMarkupControl())
|
||||
->setLabel('Client')
|
||||
->setValue(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $client->getViewURI(),
|
||||
),
|
||||
phutil_escape_html($client->getName())))
|
||||
$client->getName()))
|
||||
)
|
||||
->appendChild(
|
||||
id(new AphrontFormStaticControl())
|
||||
|
|
|
@ -50,12 +50,12 @@ extends PhabricatorOAuthClientAuthorizationBaseController {
|
|||
'article/Using_the_Phabricator_OAuth_Server.html#scopes'
|
||||
);
|
||||
$row = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $client->getViewURI(),
|
||||
),
|
||||
phutil_escape_html($client->getName())
|
||||
$client->getName()
|
||||
),
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
|
|
|
@ -94,12 +94,12 @@ final class PhabricatorOwnersDetailController
|
|||
));
|
||||
$repo_name = '<strong>'.phutil_escape_html($repo->getName()).
|
||||
'</strong>';
|
||||
$path_link = phutil_render_tag(
|
||||
$path_link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => (string) $href,
|
||||
),
|
||||
phutil_escape_html($path->getPath()));
|
||||
$path->getPath());
|
||||
$path_links[] =
|
||||
($path->getExcluded() ? '–' : '+').' '.
|
||||
$repo_name.' '.$path_link;
|
||||
|
|
|
@ -254,12 +254,12 @@ final class PhabricatorOwnersListController
|
|||
$pkg_paths[$key] =
|
||||
($path->getExcluded() ? '–' : '+').' '.
|
||||
'<strong>'.phutil_escape_html($repo->getName()).'</strong> '.
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => (string) $href,
|
||||
),
|
||||
phutil_escape_html($path->getPath()));
|
||||
$path->getPath());
|
||||
} else {
|
||||
$pkg_paths[$key] = phutil_escape_html($path->getPath());
|
||||
}
|
||||
|
@ -267,20 +267,20 @@ final class PhabricatorOwnersListController
|
|||
$pkg_paths = implode('<br />', $pkg_paths);
|
||||
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/owners/package/'.$package->getID().'/',
|
||||
),
|
||||
phutil_escape_html($package->getName())),
|
||||
$package->getName()),
|
||||
$pkg_owners,
|
||||
$pkg_paths,
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/audit/view/packagecommits/?phid='.$package->getPHID(),
|
||||
),
|
||||
phutil_escape_html('Related Commits'))
|
||||
'Related Commits')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,12 +49,12 @@ final class PhabricatorPeopleListController
|
|||
$rows[] = array(
|
||||
phabricator_date($user->getDateCreated(), $viewer),
|
||||
phabricator_time($user->getDateCreated(), $viewer),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/p/'.$user->getUsername().'/',
|
||||
),
|
||||
phutil_escape_html($user->getUserName())),
|
||||
$user->getUserName()),
|
||||
phutil_escape_html($user->getRealName()),
|
||||
$status,
|
||||
$email,
|
||||
|
|
|
@ -163,22 +163,22 @@ final class PhabricatorPeopleLogsController
|
|||
phutil_escape_html($handles[$log->getUserPHID()]->getName()),
|
||||
json_encode($log->getOldValue(), true),
|
||||
json_encode($log->getNewValue(), true),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $request
|
||||
->getRequestURI()
|
||||
->alter('ip', $log->getRemoteAddr()),
|
||||
),
|
||||
phutil_escape_html($log->getRemoteAddr())),
|
||||
phutil_render_tag(
|
||||
$log->getRemoteAddr()),
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $request
|
||||
->getRequestURI()
|
||||
->alter('session', $log->getSession()),
|
||||
),
|
||||
phutil_escape_html($log->getSession())),
|
||||
$log->getSession()),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -64,27 +64,26 @@ final class PhamePostView extends AphrontView {
|
|||
array(
|
||||
'class' => 'phame-post-title',
|
||||
),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
),
|
||||
phutil_escape_html($this->getPost()->getTitle())));
|
||||
$this->getPost()->getTitle()));
|
||||
}
|
||||
|
||||
public function renderDatePublished() {
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phame-post-date',
|
||||
),
|
||||
phutil_escape_html(
|
||||
pht(
|
||||
'Published on %s by %s',
|
||||
phabricator_datetime(
|
||||
$this->getPost()->getDatePublished(),
|
||||
$this->getUser()),
|
||||
$this->getAuthor()->getName())));
|
||||
$this->getAuthor()->getName()));
|
||||
}
|
||||
|
||||
public function renderBody() {
|
||||
|
|
|
@ -190,14 +190,14 @@ final class PhabricatorObjectHandle {
|
|||
$title = 'disabled'; // Overwrite status.
|
||||
}
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->getURI(),
|
||||
'class' => $class,
|
||||
'title' => $title,
|
||||
),
|
||||
phutil_escape_html($name));
|
||||
$name);
|
||||
}
|
||||
|
||||
public function getLinkName() {
|
||||
|
|
|
@ -13,12 +13,12 @@ final class PhabricatorPHIDLookupController
|
|||
$rows = array();
|
||||
foreach ($handles as $handle) {
|
||||
if ($handle->getURI()) {
|
||||
$link = phutil_render_tag(
|
||||
$link = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $handle->getURI(),
|
||||
),
|
||||
phutil_escape_html($handle->getURI()));
|
||||
$handle->getURI());
|
||||
} else {
|
||||
$link = null;
|
||||
}
|
||||
|
|
|
@ -18,13 +18,13 @@ final class PhabricatorXHPASTViewStreamController
|
|||
$name = $token->getTypeName();
|
||||
$title = "Token {$seq}: {$name}";
|
||||
|
||||
$tokens[] = phutil_render_tag(
|
||||
$tokens[] = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'title' => $title,
|
||||
'class' => 'token',
|
||||
),
|
||||
phutil_escape_html($token->getValue()));
|
||||
$token->getValue());
|
||||
}
|
||||
|
||||
return $this->buildXHPASTViewPanelResponse(implode('', $tokens));
|
||||
|
|
|
@ -29,12 +29,12 @@ final class PhabricatorXHPASTViewTreeController
|
|||
$tree = array();
|
||||
$tree[] =
|
||||
'<li>'.
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'title' => $title,
|
||||
),
|
||||
phutil_escape_html($name)).
|
||||
$name).
|
||||
'</li>';
|
||||
foreach ($root->getChildren() as $child) {
|
||||
$tree[] = '<ul>'.$this->buildTree($child).'</ul>';
|
||||
|
|
|
@ -104,12 +104,12 @@ final class PhrictionDiffController
|
|||
$crumbs->setCrumbs(
|
||||
array(
|
||||
'Phriction',
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => PhrictionDocument::getSlugURI($slug),
|
||||
),
|
||||
phutil_escape_html($current->getTitle())),
|
||||
$current->getTitle()),
|
||||
phutil_render_tag(
|
||||
'a',
|
||||
array(
|
||||
|
|
|
@ -341,12 +341,12 @@ final class PhrictionDocumentController
|
|||
|
||||
private function renderChildDocumentLink(array $info) {
|
||||
$title = nonempty($info['title'], '(Untitled Document)');
|
||||
$item = phutil_render_tag(
|
||||
$item = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => PhrictionDocument::getSlugURI($info['slug']),
|
||||
),
|
||||
phutil_escape_html($title));
|
||||
$title);
|
||||
|
||||
if (isset($info['empty'])) {
|
||||
$item = '<em>'.$item.'</em>';
|
||||
|
|
|
@ -53,12 +53,12 @@ final class PhrictionListController
|
|||
$content = $document->getContent();
|
||||
$rows[] = array(
|
||||
$handles[$content->getAuthorPHID()]->renderLink(),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => PhrictionDocument::getSlugURI($document->getSlug()),
|
||||
),
|
||||
phutil_escape_html($content->getTitle())),
|
||||
$content->getTitle()),
|
||||
phabricator_date($content->getDateCreated(), $user),
|
||||
phabricator_time($content->getDateCreated(), $user),
|
||||
);
|
||||
|
|
|
@ -77,12 +77,12 @@ final class PhabricatorPolicy {
|
|||
|
||||
public function renderDescription() {
|
||||
if ($this->getHref()) {
|
||||
$desc = phutil_render_tag(
|
||||
$desc = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->getHref(),
|
||||
),
|
||||
phutil_escape_html($this->getName()));
|
||||
$this->getName());
|
||||
} else {
|
||||
$desc = phutil_escape_html($this->getName());
|
||||
}
|
||||
|
|
|
@ -48,15 +48,13 @@ final class PonderQuestionSummaryView extends AphrontView {
|
|||
|
||||
$title =
|
||||
'<h2 class="ponder-question-title">'.
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
"href" => '/Q' . $question->getID(),
|
||||
),
|
||||
phutil_escape_html(
|
||||
'Q' . $question->getID() .
|
||||
' ' . $question->getTitle()
|
||||
)
|
||||
) .
|
||||
'</h2>';
|
||||
|
||||
|
|
|
@ -100,22 +100,22 @@ final class PhabricatorProjectListController
|
|||
|
||||
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/project/view/'.$project->getID().'/',
|
||||
),
|
||||
phutil_escape_html($project->getName())),
|
||||
$project->getName()),
|
||||
phutil_escape_html(
|
||||
PhabricatorProjectStatus::getNameForStatus($project->getStatus())),
|
||||
phutil_escape_html($blurb),
|
||||
phutil_escape_html($population),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/maniphest/view/all/?projects='.$phid,
|
||||
),
|
||||
phutil_escape_html($task_count)),
|
||||
$task_count),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -160,12 +160,12 @@ final class PhabricatorSettingsPanelProfile
|
|||
id(new AphrontFormMarkupControl())
|
||||
->setLabel('Profile URI')
|
||||
->setValue(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $profile_uri,
|
||||
),
|
||||
phutil_escape_html($profile_uri))))
|
||||
$profile_uri)))
|
||||
->appendChild(
|
||||
'<p class="aphront-form-instructions">Write something about yourself! '.
|
||||
'Make sure to include <strong>important information</strong> like '.
|
||||
|
|
|
@ -176,12 +176,12 @@ final class PhabricatorSettingsPanelSSHKeys
|
|||
$rows = array();
|
||||
foreach ($keys as $key) {
|
||||
$rows[] = array(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->getPanelURI('?edit='.$key->getID()),
|
||||
),
|
||||
phutil_escape_html($key->getName())),
|
||||
$key->getName()),
|
||||
phutil_escape_html($key->getKeyComment()),
|
||||
phutil_escape_html($key->getKeyType()),
|
||||
phabricator_date($key->getDateCreated(), $user),
|
||||
|
|
|
@ -46,12 +46,12 @@ final class PhabricatorSlowvoteListController
|
|||
foreach ($polls as $poll) {
|
||||
$rows[] = array(
|
||||
'V'.$poll->getID(),
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/V'.$poll->getID(),
|
||||
),
|
||||
phutil_escape_html($poll->getQuestion())),
|
||||
$poll->getQuestion()),
|
||||
$handles[$poll->getAuthorPHID()]->renderLink(),
|
||||
phabricator_date($poll->getDateCreated(), $user),
|
||||
phabricator_time($poll->getDateCreated(), $user),
|
||||
|
|
|
@ -115,12 +115,12 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView {
|
|||
$preview = id(new PhabricatorTimelineView())
|
||||
->setID($this->getPreviewTimelineID());
|
||||
|
||||
$header = phutil_render_tag(
|
||||
$header = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-timeline-preview-header',
|
||||
),
|
||||
phutil_escape_html(pht('Preview')));
|
||||
pht('Preview'));
|
||||
|
||||
return phutil_render_tag(
|
||||
'div',
|
||||
|
|
|
@ -13,10 +13,10 @@ final class PhabricatorBarePageExample extends PhabricatorUIExample {
|
|||
public function renderExample() {
|
||||
$view = new PhabricatorBarePageView();
|
||||
$view->appendChild(
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'h1',
|
||||
array(),
|
||||
phutil_escape_html($this->getDescription())));
|
||||
$this->getDescription()));
|
||||
|
||||
$response = new AphrontWebpageResponse();
|
||||
$response->setContent($view->render());
|
||||
|
|
|
@ -28,12 +28,12 @@ final class PhabricatorButtonsExample extends PhabricatorUIExample {
|
|||
$class .= ' button';
|
||||
}
|
||||
|
||||
$view[] = phutil_render_tag(
|
||||
$view[] = phutil_tag(
|
||||
$tag,
|
||||
array(
|
||||
'class' => $class,
|
||||
),
|
||||
phutil_escape_html(ucwords($size.' '.$color.' '.$tag)));
|
||||
ucwords($size.' '.$color.' '.$tag));
|
||||
|
||||
$view[] = '<br /><br />';
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ abstract class PhabricatorXHProfProfileView extends AphrontView {
|
|||
}
|
||||
|
||||
protected function renderSymbolLink($symbol) {
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->baseURI.'?symbol='.$symbol,
|
||||
'target' => $this->isFramed ? '_top' : null,
|
||||
),
|
||||
phutil_escape_html($symbol));
|
||||
$symbol);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ final class PhabricatorRemarkupRuleMention
|
|||
}
|
||||
|
||||
if ($exists) {
|
||||
$tag = phutil_render_tag(
|
||||
$tag = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'class' => $class,
|
||||
|
@ -103,7 +103,7 @@ final class PhabricatorRemarkupRuleMention
|
|||
'target' => '_blank',
|
||||
'title' => $actual_users[$username]['realName'],
|
||||
),
|
||||
phutil_escape_html('@'.$actual_users[$username]['username']));
|
||||
'@'.$actual_users[$username]['username']);
|
||||
foreach ($tokens as $token) {
|
||||
$engine->overwriteStoredText($token, $tag);
|
||||
}
|
||||
|
@ -112,12 +112,12 @@ final class PhabricatorRemarkupRuleMention
|
|||
// because we want to preserve the original text capitalization and it
|
||||
// may differ for each token.
|
||||
foreach ($tokens as $token) {
|
||||
$tag = phutil_render_tag(
|
||||
$tag = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => $class,
|
||||
),
|
||||
phutil_escape_html('@'.idx($original, $token, $username)));
|
||||
'@'.idx($original, $token, $username));
|
||||
$engine->overwriteStoredText($token, $tag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,13 +30,13 @@ final class PhabricatorRemarkupRulePhriction
|
|||
if ($this->getEngine()->getState('toc')) {
|
||||
$text = phutil_escape_html($name);
|
||||
} else {
|
||||
$text = phutil_render_tag(
|
||||
$text = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'class' => 'phriction-link',
|
||||
),
|
||||
phutil_escape_html($name));
|
||||
$name);
|
||||
}
|
||||
|
||||
return $this->getEngine()->storeText($text);
|
||||
|
|
|
@ -23,13 +23,13 @@ final class AphrontAttachedFileView extends AphrontView {
|
|||
'height' => 45,
|
||||
));
|
||||
|
||||
$name = phutil_render_tag(
|
||||
$name = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $file->getViewURI(),
|
||||
'target' => '_blank',
|
||||
),
|
||||
phutil_escape_html($file->getName()));
|
||||
$file->getName());
|
||||
$size = number_format($file->getByteSize()).' bytes';
|
||||
|
||||
$remove = javelin_render_tag(
|
||||
|
|
|
@ -210,12 +210,12 @@ final class AphrontTableView extends AphrontView {
|
|||
'class' => 'aphront-table-view-nodevice',
|
||||
),
|
||||
$header);
|
||||
$header_device = phutil_render_tag(
|
||||
$header_device = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'aphront-table-view-device',
|
||||
),
|
||||
phutil_escape_html($short_headers[$col_num]));
|
||||
$short_headers[$col_num]);
|
||||
|
||||
$header = $header_nodevice.$header_device;
|
||||
}
|
||||
|
|
|
@ -40,10 +40,10 @@ final class AphrontErrorView extends AphrontView {
|
|||
if ($errors) {
|
||||
$list = array();
|
||||
foreach ($errors as $error) {
|
||||
$list[] = phutil_render_tag(
|
||||
$list[] = phutil_tag(
|
||||
'li',
|
||||
array(),
|
||||
phutil_escape_html($error));
|
||||
$error);
|
||||
}
|
||||
$list = phutil_render_tag(
|
||||
'ul',
|
||||
|
@ -57,12 +57,12 @@ final class AphrontErrorView extends AphrontView {
|
|||
|
||||
$title = $this->title;
|
||||
if (strlen($title)) {
|
||||
$title = phutil_render_tag(
|
||||
$title = phutil_tag(
|
||||
'h1',
|
||||
array(
|
||||
'class' => 'aphront-error-view-head',
|
||||
),
|
||||
phutil_escape_html($title));
|
||||
$title);
|
||||
} else {
|
||||
$title = null;
|
||||
}
|
||||
|
|
|
@ -32,12 +32,12 @@ final class AphrontFormCheckboxControl extends AphrontFormControl {
|
|||
'checked' => $box['checked'] ? 'checked' : null,
|
||||
'disabled' => $this->getDisabled() ? 'disabled' : null,
|
||||
));
|
||||
$label = phutil_render_tag(
|
||||
$label = phutil_tag(
|
||||
'label',
|
||||
array(
|
||||
'for' => $id,
|
||||
),
|
||||
phutil_escape_html($box['label']));
|
||||
$box['label']);
|
||||
$rows[] =
|
||||
'<tr>'.
|
||||
'<td>'.$checkbox.'</td>'.
|
||||
|
|
|
@ -34,13 +34,13 @@ final class AphrontFormRadioButtonControl extends AphrontFormControl {
|
|||
: null,
|
||||
'disabled' => $this->getDisabled() ? 'disabled' : null,
|
||||
));
|
||||
$label = phutil_render_tag(
|
||||
$label = phutil_tag(
|
||||
'label',
|
||||
array(
|
||||
'for' => $id,
|
||||
'class' => $button['class'],
|
||||
),
|
||||
phutil_escape_html($button['label']));
|
||||
$button['label']);
|
||||
|
||||
if (strlen($button['caption'])) {
|
||||
$label .=
|
||||
|
|
|
@ -52,13 +52,13 @@ final class AphrontFormSelectControl extends AphrontFormControl {
|
|||
),
|
||||
implode("\n", self::renderOptions($selected, $thing)));
|
||||
} else {
|
||||
$tags[] = phutil_render_tag(
|
||||
$tags[] = phutil_tag(
|
||||
'option',
|
||||
array(
|
||||
'selected' => ($value == $selected) ? 'selected' : null,
|
||||
'value' => $value,
|
||||
),
|
||||
phutil_escape_html($thing));
|
||||
$thing);
|
||||
}
|
||||
}
|
||||
return $tags;
|
||||
|
|
|
@ -5,13 +5,13 @@ final class AphrontFormSubmitControl extends AphrontFormControl {
|
|||
protected $cancelButton;
|
||||
|
||||
public function addCancelButton($href, $label = 'Cancel') {
|
||||
$this->cancelButton = phutil_render_tag(
|
||||
$this->cancelButton = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $href,
|
||||
'class' => 'button grey',
|
||||
),
|
||||
phutil_escape_html($label));
|
||||
$label);
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -22,13 +22,13 @@ final class AphrontFormSubmitControl extends AphrontFormControl {
|
|||
protected function renderInput() {
|
||||
$submit_button = null;
|
||||
if ($this->getValue()) {
|
||||
$submit_button = phutil_render_tag(
|
||||
$submit_button = phutil_tag(
|
||||
'button',
|
||||
array(
|
||||
'name' => '__submit__',
|
||||
'disabled' => $this->getDisabled() ? 'disabled' : null,
|
||||
),
|
||||
phutil_escape_html($this->getValue()));
|
||||
$this->getValue());
|
||||
}
|
||||
return $submit_button.$this->cancelButton;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ class AphrontFormTextAreaControl extends AphrontFormControl {
|
|||
$classes[] = $this->customClass;
|
||||
$classes = trim(implode(' ', $classes));
|
||||
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'textarea',
|
||||
array(
|
||||
'name' => $this->getName(),
|
||||
|
@ -72,7 +72,7 @@ class AphrontFormTextAreaControl extends AphrontFormControl {
|
|||
'id' => $this->getID(),
|
||||
'placeholder' => $this->getPlaceHolder(),
|
||||
),
|
||||
phutil_escape_html($this->getValue()));
|
||||
$this->getValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,13 +37,13 @@ final class AphrontFormToggleButtonsControl extends AphrontFormControl {
|
|||
$more = null;
|
||||
}
|
||||
|
||||
$out[] = phutil_render_tag(
|
||||
$out[] = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'class' => 'toggle'.$more,
|
||||
'href' => $this->baseURI->alter($this->param, $value),
|
||||
),
|
||||
phutil_escape_html($label));
|
||||
$label);
|
||||
}
|
||||
|
||||
return implode('', $out);
|
||||
|
|
|
@ -92,12 +92,12 @@ final class PhabricatorActionView extends AphrontView {
|
|||
phutil_escape_html($this->name));
|
||||
}
|
||||
} else {
|
||||
$item = phutil_render_tag(
|
||||
$item = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-action-view-item',
|
||||
),
|
||||
phutil_escape_html($this->name));
|
||||
$this->name);
|
||||
}
|
||||
|
||||
$classes = array();
|
||||
|
|
|
@ -27,12 +27,12 @@ final class PhabricatorHeaderView extends AphrontView {
|
|||
$header = phutil_escape_html($this->header);
|
||||
|
||||
if ($this->objectName) {
|
||||
$header = phutil_render_tag(
|
||||
$header = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/'.$this->objectName,
|
||||
),
|
||||
phutil_escape_html($this->objectName)).' '.$header;
|
||||
$this->objectName).' '.$header;
|
||||
}
|
||||
|
||||
if ($this->tags) {
|
||||
|
|
|
@ -117,12 +117,12 @@ final class PhabricatorMenuItemView extends AphrontTagView {
|
|||
if ($this->isExternal) {
|
||||
$external = " \xE2\x86\x97";
|
||||
}
|
||||
$name = phutil_render_tag(
|
||||
$name = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-menu-item-name',
|
||||
),
|
||||
phutil_escape_html($this->name.$external));
|
||||
$this->name.$external);
|
||||
}
|
||||
|
||||
return $this->renderChildren().$name;
|
||||
|
|
|
@ -32,12 +32,12 @@ final class PhabricatorObjectItemListView extends AphrontView {
|
|||
|
||||
$header = null;
|
||||
if (strlen($this->header)) {
|
||||
$header = phutil_render_tag(
|
||||
$header = phutil_tag(
|
||||
'h1',
|
||||
array(
|
||||
'class' => 'phabricator-object-item-list-header',
|
||||
),
|
||||
phutil_escape_html($this->header));
|
||||
$this->header);
|
||||
}
|
||||
|
||||
if ($this->items) {
|
||||
|
|
|
@ -71,13 +71,13 @@ final class PhabricatorObjectItemView extends AphrontView {
|
|||
}
|
||||
|
||||
public function render() {
|
||||
$header = phutil_render_tag(
|
||||
$header = phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => $this->href,
|
||||
'class' => 'phabricator-object-item-name',
|
||||
),
|
||||
phutil_escape_html($this->header));
|
||||
$this->header);
|
||||
|
||||
$icons = null;
|
||||
if ($this->icons) {
|
||||
|
@ -93,12 +93,12 @@ final class PhabricatorObjectItemView extends AphrontView {
|
|||
),
|
||||
'');
|
||||
|
||||
$label = phutil_render_tag(
|
||||
$label = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'phabricator-object-item-icon-label',
|
||||
),
|
||||
phutil_escape_html($spec['label']));
|
||||
$spec['label']);
|
||||
|
||||
$icon_list[] = phutil_render_tag(
|
||||
'li',
|
||||
|
|
|
@ -87,12 +87,12 @@ final class PhabricatorPropertyListView extends AphrontView {
|
|||
$key = $spec['key'];
|
||||
$value = $spec['value'];
|
||||
|
||||
$items[] = phutil_render_tag(
|
||||
$items[] = phutil_tag(
|
||||
'dt',
|
||||
array(
|
||||
'class' => 'phabricator-property-list-key',
|
||||
),
|
||||
phutil_escape_html($key));
|
||||
$key);
|
||||
$items[] = phutil_render_tag(
|
||||
'dd',
|
||||
array(
|
||||
|
@ -137,12 +137,12 @@ final class PhabricatorPropertyListView extends AphrontView {
|
|||
}
|
||||
|
||||
private function renderSectionPart(array $part) {
|
||||
return phutil_render_tag(
|
||||
return phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-property-list-section-header',
|
||||
),
|
||||
phutil_escape_html($part['name']));
|
||||
$part['name']);
|
||||
}
|
||||
|
||||
private function renderTextPart(array $part) {
|
||||
|
|
|
@ -105,12 +105,12 @@ final class PhabricatorTransactionView extends AphrontView {
|
|||
->setAnchorName($this->anchorName)
|
||||
->render();
|
||||
|
||||
$info[] = $anchor.phutil_render_tag(
|
||||
$info[] = $anchor.phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '#'.$this->anchorName,
|
||||
),
|
||||
phutil_escape_html($this->anchorText));
|
||||
$this->anchorText);
|
||||
}
|
||||
|
||||
$info = implode(' · ', $info);
|
||||
|
|
|
@ -30,13 +30,13 @@ final class AphrontHeadsupView extends AphrontView {
|
|||
public function render() {
|
||||
$header =
|
||||
'<h1>'.
|
||||
phutil_render_tag(
|
||||
phutil_tag(
|
||||
'a',
|
||||
array(
|
||||
'href' => '/'.$this->objectName,
|
||||
'class' => 'aphront-headsup-object-name',
|
||||
),
|
||||
phutil_escape_html($this->objectName)).
|
||||
$this->objectName).
|
||||
' '.
|
||||
phutil_escape_html($this->header).
|
||||
'</h1>';
|
||||
|
|
|
@ -303,13 +303,13 @@ final class PhabricatorMainMenuView extends AphrontView {
|
|||
$count_number = "\xE2\x88\x9E";
|
||||
}
|
||||
|
||||
$count_tag = phutil_render_tag(
|
||||
$count_tag = phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'id' => $count_id,
|
||||
'class' => 'phabricator-main-menu-alert-count'
|
||||
),
|
||||
phutil_escape_html($count_number));
|
||||
$count_number);
|
||||
|
||||
$icon_tag = phutil_render_tag(
|
||||
'span',
|
||||
|
|
Loading…
Reference in a new issue