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