diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index e91884ef58..6d17506831 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -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 { diff --git a/src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php b/src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php index 20123516f8..fae5ff2cb1 100644 --- a/src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php +++ b/src/aphront/console/plugin/DarkConsoleErrorLogPlugin.php @@ -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"; } diff --git a/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php b/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php index 9f2a03dfd6..1745e1f274 100644 --- a/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php +++ b/src/applications/chatlog/controller/PhabricatorChatLogChannelListController.php @@ -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); diff --git a/src/applications/conduit/controller/PhabricatorConduitListController.php b/src/applications/conduit/controller/PhabricatorConduitListController.php index 7c16896516..617ca48288 100644 --- a/src/applications/conduit/controller/PhabricatorConduitListController.php +++ b/src/applications/conduit/controller/PhabricatorConduitListController.php @@ -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, ); diff --git a/src/applications/config/controller/PhabricatorConfigAllController.php b/src/applications/config/controller/PhabricatorConfigAllController.php index e5bbc7552a..e140ffc9ef 100644 --- a/src/applications/config/controller/PhabricatorConfigAllController.php +++ b/src/applications/config/controller/PhabricatorConfigAllController.php @@ -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, ); } diff --git a/src/applications/config/view/PhabricatorSetupIssueView.php b/src/applications/config/view/PhabricatorSetupIssueView.php index c85caed1ee..645999f190 100644 --- a/src/applications/config/view/PhabricatorSetupIssueView.php +++ b/src/applications/config/view/PhabricatorSetupIssueView.php @@ -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( diff --git a/src/applications/countdown/controller/PhabricatorCountdownListController.php b/src/applications/countdown/controller/PhabricatorCountdownListController.php index 1f8190254d..47cc610c6d 100644 --- a/src/applications/countdown/controller/PhabricatorCountdownListController.php +++ b/src/applications/countdown/controller/PhabricatorCountdownListController.php @@ -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, diff --git a/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php b/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php index 57a3a5db2e..732b3b6a44 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php @@ -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; diff --git a/src/applications/differential/controller/DifferentialDiffViewController.php b/src/applications/differential/controller/DifferentialDiffViewController.php index b212c20293..1ca4a9de73 100644 --- a/src/applications/differential/controller/DifferentialDiffViewController.php +++ b/src/applications/differential/controller/DifferentialDiffViewController.php @@ -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( "

".pht('This diff belongs to revision %s', $link)."

"); } else { @@ -52,12 +52,12 @@ final class DifferentialDiffViewController extends DifferentialController { if ($revisions) { $select[] = ''; foreach ($revisions as $revision) { - $select[] = phutil_render_tag( + $select[] = phutil_tag( 'option', array( 'value' => $revision->getID(), ), - phutil_escape_html($revision->getTitle())); + $revision->getTitle()); } $select[] = ''; } diff --git a/src/applications/differential/field/specification/DifferentialTitleFieldSpecification.php b/src/applications/differential/field/specification/DifferentialTitleFieldSpecification.php index 6a1c6ce20c..07095e0800 100644 --- a/src/applications/differential/field/specification/DifferentialTitleFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialTitleFieldSpecification.php @@ -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()); } } diff --git a/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php b/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php index e13117d2b5..dfa474be67 100644 --- a/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php +++ b/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php @@ -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', diff --git a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php index ff00f973e9..8e7e9f926c 100644 --- a/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php +++ b/src/applications/differential/view/DifferentialRevisionUpdateHistoryView.php @@ -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[] = ''. ''.phutil_escape_html($name).''. @@ -179,7 +179,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView { $select = ''; diff --git a/src/applications/diffusion/controller/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/DiffusionBrowseFileController.php index edab2227ed..c0835332f4 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseFileController.php @@ -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', diff --git a/src/applications/diffusion/controller/DiffusionCommitBranchesController.php b/src/applications/diffusion/controller/DiffusionCommitBranchesController.php index c456d5e9af..4b306f5b10 100644 --- a/src/applications/diffusion/controller/DiffusionCommitBranchesController.php +++ b/src/applications/diffusion/controller/DiffusionCommitBranchesController.php @@ -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()) diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index 72ba662840..8afcc4b0e7 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -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; diff --git a/src/applications/diffusion/controller/DiffusionCommitTagsController.php b/src/applications/diffusion/controller/DiffusionCommitTagsController.php index fea9d58716..5dbabff240 100644 --- a/src/applications/diffusion/controller/DiffusionCommitTagsController.php +++ b/src/applications/diffusion/controller/DiffusionCommitTagsController.php @@ -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) { diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php index 4178c6bd2a..ea11c4831b 100644 --- a/src/applications/diffusion/controller/DiffusionController.php +++ b/src/applications/diffusion/controller/DiffusionController.php @@ -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); diff --git a/src/applications/diffusion/controller/DiffusionExternalController.php b/src/applications/diffusion/controller/DiffusionExternalController.php index 1f3fc6c6b2..738cee81fd 100644 --- a/src/applications/diffusion/controller/DiffusionExternalController.php +++ b/src/applications/diffusion/controller/DiffusionExternalController.php @@ -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()), ); } diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php index 4b9193616d..fe541054e7 100644 --- a/src/applications/diffusion/controller/DiffusionHistoryController.php +++ b/src/applications/diffusion/controller/DiffusionHistoryController.php @@ -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()); diff --git a/src/applications/diffusion/controller/DiffusionHomeController.php b/src/applications/diffusion/controller/DiffusionHomeController.php index d59504f69a..c951b764a8 100644 --- a/src/applications/diffusion/controller/DiffusionHomeController.php +++ b/src/applications/diffusion/controller/DiffusionHomeController.php @@ -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()), diff --git a/src/applications/diffusion/controller/DiffusionSymbolController.php b/src/applications/diffusion/controller/DiffusionSymbolController.php index ab118c3948..17fcea83ae 100644 --- a/src/applications/diffusion/controller/DiffusionSymbolController.php +++ b/src/applications/diffusion/controller/DiffusionSymbolController.php @@ -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 { diff --git a/src/applications/diffusion/view/DiffusionBranchTableView.php b/src/applications/diffusion/view/DiffusionBranchTableView.php index ee95580932..4ac40d73ca 100644 --- a/src/applications/diffusion/view/DiffusionBranchTableView.php +++ b/src/applications/diffusion/view/DiffusionBranchTableView.php @@ -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()), diff --git a/src/applications/diffusion/view/DiffusionBrowseTableView.php b/src/applications/diffusion/view/DiffusionBrowseTableView.php index 004faf0a21..fdf1651474 100644 --- a/src/applications/diffusion/view/DiffusionBrowseTableView.php +++ b/src/applications/diffusion/view/DiffusionBrowseTableView.php @@ -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); } } diff --git a/src/applications/diffusion/view/DiffusionTagListView.php b/src/applications/diffusion/view/DiffusionTagListView.php index dee0ec3d2a..b2291dcfe9 100644 --- a/src/applications/diffusion/view/DiffusionTagListView.php +++ b/src/applications/diffusion/view/DiffusionTagListView.php @@ -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()) { diff --git a/src/applications/diviner/controller/DivinerListController.php b/src/applications/diviner/controller/DivinerListController.php index 7ac7aa453a..2125532b98 100644 --- a/src/applications/diviner/controller/DivinerListController.php +++ b/src/applications/diviner/controller/DivinerListController.php @@ -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[] = '
'. diff --git a/src/applications/drydock/controller/DrydockController.php b/src/applications/drydock/controller/DrydockController.php index a3bcc28ea1..e05c1f6839 100644 --- a/src/applications/drydock/controller/DrydockController.php +++ b/src/applications/drydock/controller/DrydockController.php @@ -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()); diff --git a/src/applications/feed/builder/PhabricatorFeedBuilder.php b/src/applications/feed/builder/PhabricatorFeedBuilder.php index 25a127bc5c..dfb9751cf8 100644 --- a/src/applications/feed/builder/PhabricatorFeedBuilder.php +++ b/src/applications/feed/builder/PhabricatorFeedBuilder.php @@ -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(); diff --git a/src/applications/feed/story/PhabricatorFeedStory.php b/src/applications/feed/story/PhabricatorFeedStory.php index 5d9823aac4..b9715efca6 100644 --- a/src/applications/feed/story/PhabricatorFeedStory.php +++ b/src/applications/feed/story/PhabricatorFeedStory.php @@ -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) { diff --git a/src/applications/herald/controller/HeraldTranscriptController.php b/src/applications/herald/controller/HeraldTranscriptController.php index 5dec02733e..62af029da8 100644 --- a/src/applications/herald/controller/HeraldTranscriptController.php +++ b/src/applications/herald/controller/HeraldTranscriptController.php @@ -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 { diff --git a/src/applications/herald/view/HeraldRuleEditHistoryView.php b/src/applications/herald/view/HeraldRuleEditHistoryView.php index d931d2b2d6..7e3fb7b625 100644 --- a/src/applications/herald/view/HeraldRuleEditHistoryView.php +++ b/src/applications/herald/view/HeraldRuleEditHistoryView.php @@ -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': diff --git a/src/applications/herald/view/HeraldRuleListView.php b/src/applications/herald/view/HeraldRuleListView.php index 65e0c8d2e0..2bfe609bdf 100644 --- a/src/applications/herald/view/HeraldRuleListView.php +++ b/src/applications/herald/view/HeraldRuleListView.php @@ -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', diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index bf44e11ecf..cee45c4c20 100644 --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -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[] = '-'; } diff --git a/src/applications/maniphest/controller/ManiphestSavedQueryListController.php b/src/applications/maniphest/controller/ManiphestSavedQueryListController.php index 3578aad4e2..9957aa0991 100644 --- a/src/applications/maniphest/controller/ManiphestSavedQueryListController.php +++ b/src/applications/maniphest/controller/ManiphestSavedQueryListController.php @@ -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( diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index 5bdb168d77..13482b8f35 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -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( diff --git a/src/applications/maniphest/view/ManiphestTaskProjectsView.php b/src/applications/maniphest/view/ManiphestTaskProjectsView.php index d83a706e0f..5e63043238 100644 --- a/src/applications/maniphest/view/ManiphestTaskProjectsView.php +++ b/src/applications/maniphest/view/ManiphestTaskProjectsView.php @@ -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) { diff --git a/src/applications/maniphest/view/ManiphestTaskSummaryView.php b/src/applications/maniphest/view/ManiphestTaskSummaryView.php index a3adbab980..075bee78dd 100644 --- a/src/applications/maniphest/view/ManiphestTaskSummaryView.php +++ b/src/applications/maniphest/view/ManiphestTaskSummaryView.php @@ -119,12 +119,12 @@ final class ManiphestTaskSummaryView extends ManiphestView { : 'None'). ''. ''. - phutil_render_tag( + phutil_tag( 'a', array( 'href' => '/T'.$task->getID(), ), - phutil_escape_html($task->getTitle())). + $task->getTitle()). ''. ''. $projects_view->render(). diff --git a/src/applications/meta/view/PhabricatorApplicationLaunchView.php b/src/applications/meta/view/PhabricatorApplicationLaunchView.php index c5c45ae1ef..d3658cdf29 100644 --- a/src/applications/meta/view/PhabricatorApplicationLaunchView.php +++ b/src/applications/meta/view/PhabricatorApplicationLaunchView.php @@ -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(); diff --git a/src/applications/meta/view/PhabricatorApplicationStatusView.php b/src/applications/meta/view/PhabricatorApplicationStatusView.php index 81718177eb..cc2339b9c3 100644 --- a/src/applications/meta/view/PhabricatorApplicationStatusView.php +++ b/src/applications/meta/view/PhabricatorApplicationStatusView.php @@ -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); } } diff --git a/src/applications/metamta/PhabricatorMetaMTAWorker.php b/src/applications/metamta/PhabricatorMetaMTAWorker.php index 4e7bff2331..f3075033b3 100644 --- a/src/applications/metamta/PhabricatorMetaMTAWorker.php +++ b/src/applications/metamta/PhabricatorMetaMTAWorker.php @@ -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()); } } diff --git a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php index b10d5c3c9a..072167576a 100644 --- a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php +++ b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php @@ -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', diff --git a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationEditController.php b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationEditController.php index 06d2969e67..ad834f75cf 100644 --- a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationEditController.php +++ b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationEditController.php @@ -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()) diff --git a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php index 9468457353..c74b040296 100644 --- a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php +++ b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php @@ -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', diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php index f8137b977d..485a3014ab 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -94,12 +94,12 @@ final class PhabricatorOwnersDetailController )); $repo_name = ''.phutil_escape_html($repo->getName()). ''; - $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; diff --git a/src/applications/owners/controller/PhabricatorOwnersListController.php b/src/applications/owners/controller/PhabricatorOwnersListController.php index b734b38d56..c23ed1eb5f 100644 --- a/src/applications/owners/controller/PhabricatorOwnersListController.php +++ b/src/applications/owners/controller/PhabricatorOwnersListController.php @@ -254,12 +254,12 @@ final class PhabricatorOwnersListController $pkg_paths[$key] = ($path->getExcluded() ? '–' : '+').' '. ''.phutil_escape_html($repo->getName()).' '. - 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('
', $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') ); } diff --git a/src/applications/people/controller/PhabricatorPeopleListController.php b/src/applications/people/controller/PhabricatorPeopleListController.php index 8ec8bf07d3..ce6f60e45a 100644 --- a/src/applications/people/controller/PhabricatorPeopleListController.php +++ b/src/applications/people/controller/PhabricatorPeopleListController.php @@ -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, diff --git a/src/applications/people/controller/PhabricatorPeopleLogsController.php b/src/applications/people/controller/PhabricatorPeopleLogsController.php index 1621bd58fe..9b10f34396 100644 --- a/src/applications/people/controller/PhabricatorPeopleLogsController.php +++ b/src/applications/people/controller/PhabricatorPeopleLogsController.php @@ -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()), ); } diff --git a/src/applications/phame/view/PhamePostView.php b/src/applications/phame/view/PhamePostView.php index 6e63fe7f17..60ab1dbc5d 100644 --- a/src/applications/phame/view/PhamePostView.php +++ b/src/applications/phame/view/PhamePostView.php @@ -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() { diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php index 7fd232c385..c16059d505 100644 --- a/src/applications/phid/PhabricatorObjectHandle.php +++ b/src/applications/phid/PhabricatorObjectHandle.php @@ -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() { diff --git a/src/applications/phid/controller/PhabricatorPHIDLookupController.php b/src/applications/phid/controller/PhabricatorPHIDLookupController.php index 7fa5e64e12..c6228df5c2 100644 --- a/src/applications/phid/controller/PhabricatorPHIDLookupController.php +++ b/src/applications/phid/controller/PhabricatorPHIDLookupController.php @@ -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; } diff --git a/src/applications/phpast/controller/PhabricatorXHPASTViewStreamController.php b/src/applications/phpast/controller/PhabricatorXHPASTViewStreamController.php index c3a3b30f67..bf7c620be9 100644 --- a/src/applications/phpast/controller/PhabricatorXHPASTViewStreamController.php +++ b/src/applications/phpast/controller/PhabricatorXHPASTViewStreamController.php @@ -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)); diff --git a/src/applications/phpast/controller/PhabricatorXHPASTViewTreeController.php b/src/applications/phpast/controller/PhabricatorXHPASTViewTreeController.php index 2e07a0317e..5b7673386e 100644 --- a/src/applications/phpast/controller/PhabricatorXHPASTViewTreeController.php +++ b/src/applications/phpast/controller/PhabricatorXHPASTViewTreeController.php @@ -29,12 +29,12 @@ final class PhabricatorXHPASTViewTreeController $tree = array(); $tree[] = '
  • '. - phutil_render_tag( + phutil_tag( 'span', array( 'title' => $title, ), - phutil_escape_html($name)). + $name). '
  • '; foreach ($root->getChildren() as $child) { $tree[] = ''; diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php index ee03806fac..2702854661 100644 --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -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( diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index 7b7a88fd98..f48e562d18 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -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 = ''.$item.''; diff --git a/src/applications/phriction/controller/PhrictionListController.php b/src/applications/phriction/controller/PhrictionListController.php index abd90432e9..65bfefe701 100644 --- a/src/applications/phriction/controller/PhrictionListController.php +++ b/src/applications/phriction/controller/PhrictionListController.php @@ -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), ); diff --git a/src/applications/policy/filter/PhabricatorPolicy.php b/src/applications/policy/filter/PhabricatorPolicy.php index b901efbfbc..305cae4cd1 100644 --- a/src/applications/policy/filter/PhabricatorPolicy.php +++ b/src/applications/policy/filter/PhabricatorPolicy.php @@ -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()); } diff --git a/src/applications/ponder/view/PonderQuestionSummaryView.php b/src/applications/ponder/view/PonderQuestionSummaryView.php index cc03d6d138..a06cdcc46d 100644 --- a/src/applications/ponder/view/PonderQuestionSummaryView.php +++ b/src/applications/ponder/view/PonderQuestionSummaryView.php @@ -48,15 +48,13 @@ final class PonderQuestionSummaryView extends AphrontView { $title = '

    '. - phutil_render_tag( + phutil_tag( 'a', array( "href" => '/Q' . $question->getID(), ), - phutil_escape_html( 'Q' . $question->getID() . ' ' . $question->getTitle() - ) ) . '

    '; diff --git a/src/applications/project/controller/PhabricatorProjectListController.php b/src/applications/project/controller/PhabricatorProjectListController.php index ca215fdf19..869a7c2404 100644 --- a/src/applications/project/controller/PhabricatorProjectListController.php +++ b/src/applications/project/controller/PhabricatorProjectListController.php @@ -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), ); } diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelProfile.php b/src/applications/settings/panel/PhabricatorSettingsPanelProfile.php index 692636405f..0ade8c291a 100644 --- a/src/applications/settings/panel/PhabricatorSettingsPanelProfile.php +++ b/src/applications/settings/panel/PhabricatorSettingsPanelProfile.php @@ -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( '

    Write something about yourself! '. 'Make sure to include important information like '. diff --git a/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php b/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php index 7bf018a2b5..0c33b30f0f 100644 --- a/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php +++ b/src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php @@ -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), diff --git a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php index 21ea6948be..19f16e9332 100644 --- a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php +++ b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php @@ -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), diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php index 4331bc27aa..04c4e2e566 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php @@ -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', diff --git a/src/applications/uiexample/examples/PhabricatorBarePageExample.php b/src/applications/uiexample/examples/PhabricatorBarePageExample.php index 5a3bf279c4..15aeb681ba 100644 --- a/src/applications/uiexample/examples/PhabricatorBarePageExample.php +++ b/src/applications/uiexample/examples/PhabricatorBarePageExample.php @@ -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()); diff --git a/src/applications/uiexample/examples/PhabricatorButtonsExample.php b/src/applications/uiexample/examples/PhabricatorButtonsExample.php index 0553a4b59f..d234bc2308 100644 --- a/src/applications/uiexample/examples/PhabricatorButtonsExample.php +++ b/src/applications/uiexample/examples/PhabricatorButtonsExample.php @@ -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[] = '

    '; } diff --git a/src/applications/xhprof/view/PhabricatorXHProfProfileView.php b/src/applications/xhprof/view/PhabricatorXHProfProfileView.php index f4df87a422..fd06a49fdc 100644 --- a/src/applications/xhprof/view/PhabricatorXHProfProfileView.php +++ b/src/applications/xhprof/view/PhabricatorXHProfProfileView.php @@ -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); } } diff --git a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleMention.php b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleMention.php index 1591d0b62b..f68d05fb64 100644 --- a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleMention.php +++ b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleMention.php @@ -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); } } diff --git a/src/infrastructure/markup/rule/PhabricatorRemarkupRulePhriction.php b/src/infrastructure/markup/rule/PhabricatorRemarkupRulePhriction.php index 04a10bed91..410d507b47 100644 --- a/src/infrastructure/markup/rule/PhabricatorRemarkupRulePhriction.php +++ b/src/infrastructure/markup/rule/PhabricatorRemarkupRulePhriction.php @@ -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); diff --git a/src/view/control/AphrontAttachedFileView.php b/src/view/control/AphrontAttachedFileView.php index 499162ba63..a728515387 100644 --- a/src/view/control/AphrontAttachedFileView.php +++ b/src/view/control/AphrontAttachedFileView.php @@ -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( diff --git a/src/view/control/AphrontTableView.php b/src/view/control/AphrontTableView.php index b5f4f826a4..c3bffde73f 100644 --- a/src/view/control/AphrontTableView.php +++ b/src/view/control/AphrontTableView.php @@ -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; } diff --git a/src/view/form/AphrontErrorView.php b/src/view/form/AphrontErrorView.php index 632561ddec..d3dc20a0a3 100644 --- a/src/view/form/AphrontErrorView.php +++ b/src/view/form/AphrontErrorView.php @@ -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; } diff --git a/src/view/form/control/AphrontFormCheckboxControl.php b/src/view/form/control/AphrontFormCheckboxControl.php index d2d05e77a3..00a85f52a9 100644 --- a/src/view/form/control/AphrontFormCheckboxControl.php +++ b/src/view/form/control/AphrontFormCheckboxControl.php @@ -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[] = ''. ''.$checkbox.''. diff --git a/src/view/form/control/AphrontFormRadioButtonControl.php b/src/view/form/control/AphrontFormRadioButtonControl.php index e15dd03c8d..6d6547c8b6 100644 --- a/src/view/form/control/AphrontFormRadioButtonControl.php +++ b/src/view/form/control/AphrontFormRadioButtonControl.php @@ -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 .= diff --git a/src/view/form/control/AphrontFormSelectControl.php b/src/view/form/control/AphrontFormSelectControl.php index 419d8ea352..bc01e742b3 100644 --- a/src/view/form/control/AphrontFormSelectControl.php +++ b/src/view/form/control/AphrontFormSelectControl.php @@ -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; diff --git a/src/view/form/control/AphrontFormSubmitControl.php b/src/view/form/control/AphrontFormSubmitControl.php index 9ec7593dcd..c2ccb915e5 100644 --- a/src/view/form/control/AphrontFormSubmitControl.php +++ b/src/view/form/control/AphrontFormSubmitControl.php @@ -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; } diff --git a/src/view/form/control/AphrontFormTextAreaControl.php b/src/view/form/control/AphrontFormTextAreaControl.php index 921d8caef3..311beaea8e 100644 --- a/src/view/form/control/AphrontFormTextAreaControl.php +++ b/src/view/form/control/AphrontFormTextAreaControl.php @@ -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()); } } diff --git a/src/view/form/control/AphrontFormToggleButtonsControl.php b/src/view/form/control/AphrontFormToggleButtonsControl.php index f4ec32bacd..43f83ed1b9 100644 --- a/src/view/form/control/AphrontFormToggleButtonsControl.php +++ b/src/view/form/control/AphrontFormToggleButtonsControl.php @@ -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); diff --git a/src/view/layout/PhabricatorActionView.php b/src/view/layout/PhabricatorActionView.php index c148cc380d..30bbd218f2 100644 --- a/src/view/layout/PhabricatorActionView.php +++ b/src/view/layout/PhabricatorActionView.php @@ -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(); diff --git a/src/view/layout/PhabricatorHeaderView.php b/src/view/layout/PhabricatorHeaderView.php index 97d26bd6b9..8d2d7a911b 100644 --- a/src/view/layout/PhabricatorHeaderView.php +++ b/src/view/layout/PhabricatorHeaderView.php @@ -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) { diff --git a/src/view/layout/PhabricatorMenuItemView.php b/src/view/layout/PhabricatorMenuItemView.php index 69f4d1db76..768ee2a709 100644 --- a/src/view/layout/PhabricatorMenuItemView.php +++ b/src/view/layout/PhabricatorMenuItemView.php @@ -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; diff --git a/src/view/layout/PhabricatorObjectItemListView.php b/src/view/layout/PhabricatorObjectItemListView.php index 8b5f933d7a..a145b7ba43 100644 --- a/src/view/layout/PhabricatorObjectItemListView.php +++ b/src/view/layout/PhabricatorObjectItemListView.php @@ -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) { diff --git a/src/view/layout/PhabricatorObjectItemView.php b/src/view/layout/PhabricatorObjectItemView.php index ae40e59117..6161073f84 100644 --- a/src/view/layout/PhabricatorObjectItemView.php +++ b/src/view/layout/PhabricatorObjectItemView.php @@ -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', diff --git a/src/view/layout/PhabricatorPropertyListView.php b/src/view/layout/PhabricatorPropertyListView.php index 8110791673..4fb140b04b 100644 --- a/src/view/layout/PhabricatorPropertyListView.php +++ b/src/view/layout/PhabricatorPropertyListView.php @@ -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) { diff --git a/src/view/layout/PhabricatorTransactionView.php b/src/view/layout/PhabricatorTransactionView.php index 4e6ab0d4ca..64e5bf54d1 100644 --- a/src/view/layout/PhabricatorTransactionView.php +++ b/src/view/layout/PhabricatorTransactionView.php @@ -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); diff --git a/src/view/layout/headsup/AphrontHeadsupView.php b/src/view/layout/headsup/AphrontHeadsupView.php index ba6fa8c827..9e3b8f0896 100644 --- a/src/view/layout/headsup/AphrontHeadsupView.php +++ b/src/view/layout/headsup/AphrontHeadsupView.php @@ -30,13 +30,13 @@ final class AphrontHeadsupView extends AphrontView { public function render() { $header = '

    '. - 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). '

    '; diff --git a/src/view/page/menu/PhabricatorMainMenuView.php b/src/view/page/menu/PhabricatorMainMenuView.php index f3c3596719..588467aca6 100644 --- a/src/view/page/menu/PhabricatorMainMenuView.php +++ b/src/view/page/menu/PhabricatorMainMenuView.php @@ -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',