From 9670f0c6368e393948d27d99b4746e29a9412342 Mon Sep 17 00:00:00 2001 From: vrana Date: Thu, 17 Jan 2013 18:47:13 -0800 Subject: [PATCH] Convert phutil_render_tag(X, Y, phutil_render_tag(...)) to phutil_render_html Summary: Created with spatch: lang=diff - phutil_render_tag + phutil_render_html (X, Y, phutil_render_tag(...)) - phutil_render_tag + phutil_render_html (X, Y, phutil_render_html(...)) Test Plan: Loaded homepage Reviewers: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4502 --- .../config/controller/PhabricatorConfigEditController.php | 2 +- .../render/DifferentialChangesetTwoUpRenderer.php | 4 ++-- .../phame/controller/post/PhamePostPublishController.php | 2 +- src/applications/phame/view/PhamePostView.php | 2 +- .../controller/PhabricatorSlowvotePollController.php | 2 +- src/view/layout/PhabricatorHeaderView.php | 2 +- src/view/layout/PhabricatorPinboardItemView.php | 2 +- src/view/layout/PhabricatorSourceCodeView.php | 6 +++--- src/view/layout/PhabricatorTimelineEventView.php | 2 +- src/view/page/menu/PhabricatorMainMenuView.php | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/applications/config/controller/PhabricatorConfigEditController.php b/src/applications/config/controller/PhabricatorConfigEditController.php index c0b5dcab9f..5983bbc1ae 100644 --- a/src/applications/config/controller/PhabricatorConfigEditController.php +++ b/src/applications/config/controller/PhabricatorConfigEditController.php @@ -137,7 +137,7 @@ final class PhabricatorConfigEditController array( 'class' => 'phabricator-remarkup', ), - $engine->getOutput($option, 'description')); + phutil_safe_html($engine->getOutput($option, 'description'))); $form ->setUser($user) diff --git a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php index 337dd9a625..20c2920e6e 100644 --- a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php @@ -337,7 +337,7 @@ final class DifferentialChangesetTwoUpRenderer $vs = 0) { $old = null; if ($old_file) { - $old = phutil_render_tag( + $old = phutil_tag( 'div', array( 'class' => 'differential-image-stage' @@ -353,7 +353,7 @@ final class DifferentialChangesetTwoUpRenderer $new = null; if ($new_file) { - $new = phutil_render_tag( + $new = phutil_tag( 'div', array( 'class' => 'differential-image-stage' diff --git a/src/applications/phame/controller/post/PhamePostPublishController.php b/src/applications/phame/controller/post/PhamePostPublishController.php index 0a04ec542e..2a456fe394 100644 --- a/src/applications/phame/controller/post/PhamePostPublishController.php +++ b/src/applications/phame/controller/post/PhamePostPublishController.php @@ -70,7 +70,7 @@ final class PhamePostPublishController extends PhameController { // TODO: Clean up this CSS. - return phutil_render_tag( + return phutil_tag( 'div', array( 'style' => 'text-align: center; padding: 1em;', diff --git a/src/applications/phame/view/PhamePostView.php b/src/applications/phame/view/PhamePostView.php index 582e32ccf7..533d4402a5 100644 --- a/src/applications/phame/view/PhamePostView.php +++ b/src/applications/phame/view/PhamePostView.php @@ -59,7 +59,7 @@ final class PhamePostView extends AphrontView { public function renderTitle() { $href = $this->getSkin()->getURI('post/'.$this->getPost()->getPhameTitle()); - return phutil_render_tag( + return phutil_tag( 'h2', array( 'class' => 'phame-post-title', diff --git a/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php b/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php index b1e15f43e1..531ddaba61 100644 --- a/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php +++ b/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php @@ -401,7 +401,7 @@ final class PhabricatorSlowvotePollController $profile_image = $handle->getImageURI(); - $user_markup[] = phutil_render_tag( + $user_markup[] = phutil_tag( 'a', array( 'href' => $handle->getURI(), diff --git a/src/view/layout/PhabricatorHeaderView.php b/src/view/layout/PhabricatorHeaderView.php index 60a9e0655e..7d8a6e5109 100644 --- a/src/view/layout/PhabricatorHeaderView.php +++ b/src/view/layout/PhabricatorHeaderView.php @@ -47,7 +47,7 @@ final class PhabricatorHeaderView extends AphrontView { self::renderSingleView($this->tags)); } - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'phabricator-header-shell', diff --git a/src/view/layout/PhabricatorPinboardItemView.php b/src/view/layout/PhabricatorPinboardItemView.php index ed8b2e2998..76cf5104ba 100644 --- a/src/view/layout/PhabricatorPinboardItemView.php +++ b/src/view/layout/PhabricatorPinboardItemView.php @@ -42,7 +42,7 @@ final class PhabricatorPinboardItemView extends AphrontView { $header); } - $image = phutil_render_tag( + $image = phutil_tag( 'a', array( 'href' => $this->uri, diff --git a/src/view/layout/PhabricatorSourceCodeView.php b/src/view/layout/PhabricatorSourceCodeView.php index 49768fc1f8..790ea663d3 100644 --- a/src/view/layout/PhabricatorSourceCodeView.php +++ b/src/view/layout/PhabricatorSourceCodeView.php @@ -66,17 +66,17 @@ final class PhabricatorSourceCodeView extends AphrontView { $classes[] = 'remarkup-code'; $classes[] = 'PhabricatorMonospaced'; - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'phabricator-source-code-container', ), - phutil_render_tag( + phutil_tag( 'table', array( 'class' => implode(' ', $classes), ), - implode('', $rows))); + new PhutilSafeHTML(implode('', $rows)))); } } diff --git a/src/view/layout/PhabricatorTimelineEventView.php b/src/view/layout/PhabricatorTimelineEventView.php index 4359a5c9c0..63f7af3cdc 100644 --- a/src/view/layout/PhabricatorTimelineEventView.php +++ b/src/view/layout/PhabricatorTimelineEventView.php @@ -117,7 +117,7 @@ final class PhabricatorTimelineEventView extends AphrontView { if ($this->icon) { $title_classes[] = 'phabricator-timeline-title-with-icon'; - $icon = phutil_render_tag( + $icon = phutil_tag( 'span', array( 'class' => 'phabricator-timeline-icon-fill', diff --git a/src/view/page/menu/PhabricatorMainMenuView.php b/src/view/page/menu/PhabricatorMainMenuView.php index a8ada196e7..e833a6f828 100644 --- a/src/view/page/menu/PhabricatorMainMenuView.php +++ b/src/view/page/menu/PhabricatorMainMenuView.php @@ -271,7 +271,7 @@ final class PhabricatorMainMenuView extends AphrontView { } private function renderPhabricatorLogo() { - return phutil_render_tag( + return phutil_tag( 'a', array( 'class' => 'phabricator-main-menu-logo',