diff --git a/src/aphront/console/plugin/DarkConsoleServicesPlugin.php b/src/aphront/console/plugin/DarkConsoleServicesPlugin.php index 442ca9db4c..29e7c50d21 100644 --- a/src/aphront/console/plugin/DarkConsoleServicesPlugin.php +++ b/src/aphront/console/plugin/DarkConsoleServicesPlugin.php @@ -211,13 +211,12 @@ final class DarkConsoleServicesPlugin extends DarkConsolePlugin { $info = wordwrap($info, 128, "\n", true); if (!empty($row['explain'])) { - $analysis = phutil_escape_html($row['explain']['reason']); - $analysis = phutil_render_tag( + $analysis = phutil_tag( 'span', array( 'class' => 'explain-sev-'.$row['explain']['sev'], ), - $analysis); + $row['explain']['reason']); } $info = phutil_escape_html($info); diff --git a/src/aphront/response/AphrontRedirectResponse.php b/src/aphront/response/AphrontRedirectResponse.php index bb34a97d5b..254073390d 100644 --- a/src/aphront/response/AphrontRedirectResponse.php +++ b/src/aphront/response/AphrontRedirectResponse.php @@ -42,12 +42,12 @@ class AphrontRedirectResponse extends AphrontResponse { $error->setSeverity(AphrontErrorView::SEVERITY_NOTICE); $error->setTitle('Stopped on Redirect'); - $link = phutil_render_tag( + $link = phutil_tag( 'a', array( 'href' => $this->getURI(), ), - 'Continue to: '.phutil_escape_html($this->getURI())); + 'Continue to: '.$this->getURI()); $error->appendChild( '

You were stopped here because debug.stop-on-redirect '. diff --git a/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php b/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php index 76f98c7eed..581d3544ae 100644 --- a/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php +++ b/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php @@ -98,31 +98,29 @@ final class PhabricatorChatLogChannelLogController foreach ($blocks as $block) { $author = $block['author']; $author = phutil_utf8_shorten($author, 18); - $author = phutil_escape_html($author); - $author = phutil_render_tag('td', array('class' => 'author'), $author); + $author = phutil_tag('td', array('class' => 'author'), $author); $message = mpull($block['logs'], 'getMessage'); $message = implode("\n", $message); - $message = phutil_escape_html($message); - $message = phutil_render_tag('td', array('class' => 'message'), $message); + $message = phutil_tag('td', array('class' => 'message'), $message); $href = $uri->alter('at', $block['id']); $timestamp = $block['epoch']; $timestamp = phabricator_datetime($timestamp, $user); - $timestamp = phutil_render_tag('a', array('href' => $href), $timestamp); - $timestamp = phutil_render_tag( + $timestamp = phutil_tag('a', array('href' => $href), $timestamp); + $timestamp = phutil_tag( 'td', array( 'class' => 'timestamp', ), $timestamp); - $out[] = phutil_render_tag( + $out[] = phutil_tag( 'tr', array( 'class' => $block['class'], ), - $author.$message.$timestamp); + array($author, $message, $timestamp)); } $out[] = ''; diff --git a/src/applications/config/controller/PhabricatorConfigEditController.php b/src/applications/config/controller/PhabricatorConfigEditController.php index 78b9f96e0c..c0b5dcab9f 100644 --- a/src/applications/config/controller/PhabricatorConfigEditController.php +++ b/src/applications/config/controller/PhabricatorConfigEditController.php @@ -132,7 +132,7 @@ final class PhabricatorConfigEditController $engine = new PhabricatorMarkupEngine(); $engine->addObject($option, 'description'); $engine->process(); - $description = phutil_render_tag( + $description = phutil_tag( 'div', array( 'class' => 'phabricator-remarkup', @@ -440,12 +440,12 @@ final class PhabricatorConfigEditController require_celerity_resource('config-options-css'); - return phutil_render_tag( + return phutil_tag( 'table', array( 'class' => 'config-option-table', ), - implode("\n", $table)); + new PhutilSafeHTML(implode("\n", $table))); } private function renderDefaults(PhabricatorConfigOption $option) { @@ -492,12 +492,12 @@ final class PhabricatorConfigEditController require_celerity_resource('config-options-css'); - return phutil_render_tag( + return phutil_tag( 'table', array( 'class' => 'config-option-table', ), - implode("\n", $table)); + new PhutilSafeHTML(implode("\n", $table))); } } diff --git a/src/applications/config/controller/PhabricatorConfigGroupController.php b/src/applications/config/controller/PhabricatorConfigGroupController.php index a41bc4efdb..2f53b30496 100644 --- a/src/applications/config/controller/PhabricatorConfigGroupController.php +++ b/src/applications/config/controller/PhabricatorConfigGroupController.php @@ -84,13 +84,15 @@ final class PhabricatorConfigGroupController $current_value = PhabricatorEnv::getEnvConfig($option->getKey()); $current_value = PhabricatorConfigJSON::prettyPrintJSON( $current_value); - $current_value = phutil_render_tag( + $current_value = phutil_tag( 'div', array( 'class' => 'config-options-current-value', ), - ''.pht('Current Value:').' '. - phutil_escape_html($current_value)); + array( + phutil_tag('span', array(), pht('Current Value:')), + ' '.$current_value, + )); $item->appendChild($current_value); } diff --git a/src/applications/config/view/PhabricatorSetupIssueView.php b/src/applications/config/view/PhabricatorSetupIssueView.php index 5ac904e99a..795f124b9d 100644 --- a/src/applications/config/view/PhabricatorSetupIssueView.php +++ b/src/applications/config/view/PhabricatorSetupIssueView.php @@ -16,12 +16,12 @@ final class PhabricatorSetupIssueView extends AphrontView { public function render() { $issue = $this->getIssue(); - $description = phutil_render_tag( + $description = phutil_tag( 'div', array( 'class' => 'setup-issue-instructions', ), - nl2br(phutil_escape_html($issue->getMessage()))); + new PhutilSafeHTML(nl2br(phutil_escape_html($issue->getMessage())))); $configs = $issue->getPHPConfig(); if ($configs) { @@ -36,13 +36,15 @@ final class PhabricatorSetupIssueView extends AphrontView { $commands = $issue->getCommands(); if ($commands) { $run_these = pht("Run these %d command(s):", count($commands)); - $description .= phutil_render_tag( + $description .= phutil_tag( 'div', array( 'class' => 'setup-issue-config', ), - phutil_render_tag('p', array(), $run_these). - phutil_render_tag('pre', array(), implode("\n", $commands))); + array( + phutil_render_tag('p', array(), $run_these), + phutil_render_tag('pre', array(), implode("\n", $commands)), + )); } $extensions = $issue->getPHPExtensions(); @@ -74,17 +76,19 @@ final class PhabricatorSetupIssueView extends AphrontView { "After installing new PHP extensions, restart your webserver ". "for the changes to take effect."); - $description .= phutil_render_tag( + $description .= phutil_tag( 'div', array( 'class' => 'setup-issue-config', ), - phutil_render_tag('p', array(), $install_these). - phutil_render_tag('pre', array(), implode("\n", $extensions)). - phutil_render_tag('p', array(), $install_info). - phutil_render_tag('pre', array(), $install_commands). - phutil_render_tag('p', array(), $fallback_info). - phutil_render_tag('p', array(), $restart_info)); + array( + phutil_render_tag('p', array(), $install_these), + phutil_render_tag('pre', array(), implode("\n", $extensions)), + phutil_render_tag('p', array(), $install_info), + phutil_render_tag('pre', array(), $install_commands), + phutil_render_tag('p', array(), $fallback_info), + phutil_render_tag('p', array(), $restart_info), + )); } @@ -102,18 +106,18 @@ final class PhabricatorSetupIssueView extends AphrontView { ), $issue->getName()); - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'setup-issue', ), - $name.$description.$next); + array($name, $description, $next)); } private function renderPhabricatorConfig(array $configs) { $issue = $this->getIssue(); - $table_info = phutil_render_tag( + $table_info = phutil_tag( 'p', array(), pht( @@ -141,16 +145,16 @@ final class PhabricatorSetupIssueView extends AphrontView { $table[] = ''; } - $table = phutil_render_tag( + $table = phutil_tag( 'table', array( ), - implode("\n", $table)); + new PhutilSafeHTML(implode("\n", $table))); $options = PhabricatorApplicationConfigOptions::loadAllOptions(); if ($this->getIssue()->getIsFatal()) { - $update_info = phutil_render_tag( + $update_info = phutil_tag( 'p', array(), pht( @@ -172,12 +176,12 @@ final class PhabricatorSetupIssueView extends AphrontView { if (!idx($options, $config) || $options[$config]->getLocked()) { continue; } - $link = phutil_render_tag( + $link = phutil_tag( 'a', array( 'href' => '/config/edit/'.$config.'/?issue='.$issue->getIssueKey(), ), - pht('Edit %s', phutil_escape_html($config))); + pht('Edit %s', $config)); $update[] = '

  • '.$link.'
  • '; } if ($update) { @@ -207,7 +211,7 @@ final class PhabricatorSetupIssueView extends AphrontView { } private function renderPHPConfig(array $configs) { - $table_info = phutil_render_tag( + $table_info = phutil_tag( 'p', array(), pht( @@ -236,12 +240,10 @@ final class PhabricatorSetupIssueView extends AphrontView { $table[] = ''; } - $table = phutil_render_tag( + $table = phutil_tag( 'table', - array( - - ), - implode("\n", $table)); + array(), + new PhutilSafeHTML(implode("\n", $table))); ob_start(); phpinfo(); @@ -269,14 +271,14 @@ final class PhabricatorSetupIssueView extends AphrontView { } if (!$ini_loc) { - $info = phutil_render_tag( + $info = phutil_tag( 'p', array(), pht( "To update these %d value(s), edit your PHP configuration file.", count($configs))); } else { - $info = phutil_render_tag( + $info = phutil_tag( 'p', array(), pht( @@ -290,7 +292,7 @@ final class PhabricatorSetupIssueView extends AphrontView { } if ($more_loc) { - $info .= phutil_render_tag( + $info .= phutil_tag( 'p', array(), pht( @@ -302,32 +304,27 @@ final class PhabricatorSetupIssueView extends AphrontView { implode("\n", $more_loc)); } - $info .= phutil_render_tag( + $info .= phutil_tag( 'p', array(), - pht( - "You can find more information about PHP configuration values in the ". - "%s.", - phutil_tag( - 'a', - array( - 'href' => 'http://php.net/manual/ini.list.php', - ), - pht('PHP Documentation')))); + phutil_safe_html(pht( + 'You can find more information about PHP configuration values in the '. + 'PHP Documentation.', + 'http://php.net/manual/ini.list.php'))); - $info .= phutil_render_tag( + $info .= phutil_tag( 'p', array(), - pht( + phutil_safe_html(pht( "After editing the PHP configuration, restart your ". - "webserver for the changes to take effect.")); + "webserver for the changes to take effect."))); - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'setup-issue-config', ), - $table_info.$table.$info); + array($table_info, $table, $info)); } } diff --git a/src/applications/daemon/view/PhabricatorDaemonLogListView.php b/src/applications/daemon/view/PhabricatorDaemonLogListView.php index 35f234733a..c60b584209 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogListView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogListView.php @@ -66,7 +66,7 @@ final class PhabricatorDaemonLogListView extends AphrontView { $symbol = '?'; } - $running = phutil_render_tag( + $running = phutil_tag( 'span', array( 'style' => $style, diff --git a/src/applications/differential/field/specification/DifferentialLintFieldSpecification.php b/src/applications/differential/field/specification/DifferentialLintFieldSpecification.php index b2a9a4c943..2c0164a255 100644 --- a/src/applications/differential/field/specification/DifferentialLintFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialLintFieldSpecification.php @@ -87,7 +87,7 @@ final class DifferentialLintFieldSpecification if ($diff->getID() != $this->getDiff()->getID()) { $href = '/D'.$diff->getRevisionID().'?id='.$diff->getID().$href; } - $line_link = phutil_render_tag( + $line_link = phutil_tag( 'a', array( 'href' => $href, diff --git a/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php b/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php index 8900aef7f8..b4e89b3fa9 100644 --- a/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php @@ -93,9 +93,9 @@ final class DifferentialUnitFieldSpecification $hidden[$result]++; } - $value = phutil_escape_html(idx($test, 'name')); + $value = idx($test, 'name'); if (!empty($test['link'])) { - $value = phutil_render_tag( + $value = phutil_tag( 'a', array( 'href' => $test['link'], diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php index fc969acd94..acea5b060d 100644 --- a/src/applications/differential/view/DifferentialChangesetListView.php +++ b/src/applications/differential/view/DifferentialChangesetListView.php @@ -158,12 +158,12 @@ final class DifferentialChangesetListView extends AphrontView { 'Load'); } $detail->appendChild( - phutil_render_tag( + phutil_tag( 'div', array( 'id' => $uniq_id, ), - '
    '.$load.'
    ')); + phutil_tag('div', array('class' => 'differential-loading'), $load))); $output[] = $detail->render(); } @@ -217,12 +217,12 @@ final class DifferentialChangesetListView extends AphrontView { ), 'Undo'); - $div = phutil_render_tag( + $div = phutil_tag( 'div', array( 'class' => 'differential-inline-undo', ), - 'Changes discarded. '.$link); + array('Changes discarded. ', $link)); $template = ''. diff --git a/src/applications/differential/view/DifferentialDiffTableOfContentsView.php b/src/applications/differential/view/DifferentialDiffTableOfContentsView.php index 2c5d5058af..818522b2ba 100644 --- a/src/applications/differential/view/DifferentialDiffTableOfContentsView.php +++ b/src/applications/differential/view/DifferentialDiffTableOfContentsView.php @@ -137,7 +137,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView { if ($cov === null) { $mcov = $cov = '-'; } else { - $mcov = phutil_render_tag( + $mcov = phutil_tag( 'div', array( 'id' => 'differential-mcoverage-'.md5($fname), diff --git a/src/applications/differential/view/DifferentialRevisionCommentView.php b/src/applications/differential/view/DifferentialRevisionCommentView.php index 0670e87bdb..251c6d12fd 100644 --- a/src/applications/differential/view/DifferentialRevisionCommentView.php +++ b/src/applications/differential/view/DifferentialRevisionCommentView.php @@ -134,12 +134,12 @@ final class DifferentialRevisionCommentView extends AphrontView { case DifferentialAction::ACTION_UPDATE: $diff_id = idx($metadata, DifferentialComment::METADATA_DIFF_ID); if ($diff_id) { - $diff_link = phutil_render_tag( + $diff_link = phutil_tag( 'a', array( 'href' => '/D'.$comment->getRevisionID().'?id='.$diff_id, ), - 'Diff #'.phutil_escape_html($diff_id)); + 'Diff #'.$diff_id); $actions[] = "{$author_link} updated this revision to {$diff_link}."; } else { $actions[] = "{$author_link} {$verb} this revision."; diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index b0565ca6ce..62d247a651 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -108,7 +108,7 @@ final class DiffusionBrowseController extends DiffusionController { $engine = PhabricatorMarkupEngine::newDiffusionMarkupEngine(); $text = $engine->markupText($text); - $text = phutil_render_tag( + $text = phutil_tag( 'div', array( 'class' => 'phabricator-remarkup', diff --git a/src/applications/diffusion/controller/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/DiffusionBrowseFileController.php index c0835332f4..36bc8443a3 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseFileController.php @@ -271,7 +271,7 @@ final class DiffusionBrowseFileController extends DiffusionController { 'sigil' => 'diffusion-source', ), implode("\n", $rows)); - $corpus = phutil_render_tag( + $corpus = phutil_tag( 'div', array( 'style' => 'padding: 0 2em;', @@ -666,7 +666,7 @@ final class DiffusionBrowseFileController extends DiffusionController { "\xC2\xAB"); } - $blame[] = phutil_render_tag( + $blame[] = phutil_tag( 'th', array( 'class' => 'diffusion-blame-link', @@ -674,7 +674,7 @@ final class DiffusionBrowseFileController extends DiffusionController { ), $before_link); - $blame[] = phutil_render_tag( + $blame[] = phutil_tag( 'th', array( 'class' => 'diffusion-rev-link', @@ -682,7 +682,7 @@ final class DiffusionBrowseFileController extends DiffusionController { ), $commit_link); - $blame[] = phutil_render_tag( + $blame[] = phutil_tag( 'th', array( 'class' => 'diffusion-rev-link', @@ -690,7 +690,7 @@ final class DiffusionBrowseFileController extends DiffusionController { ), $revision_link); - $blame[] = phutil_render_tag( + $blame[] = phutil_tag( 'th', array( 'class' => 'diffusion-author-link', @@ -717,8 +717,6 @@ final class DiffusionBrowseFileController extends DiffusionController { Javelin::initBehavior('diffusion-line-linker'); - $blame = implode('', $blame); - if ($line['target']) { Javelin::initBehavior( 'diffusion-jump-to', @@ -730,7 +728,7 @@ final class DiffusionBrowseFileController extends DiffusionController { $anchor_text = null; } - $line_text = phutil_render_tag( + $blame[] = phutil_render_tag( 'td', array( ), @@ -738,13 +736,12 @@ final class DiffusionBrowseFileController extends DiffusionController { "\xE2\x80\x8B". // NOTE: See phabricator-oncopy behavior. $line['data']); - $rows[] = phutil_render_tag( + $rows[] = phutil_tag( 'tr', array( 'class' => ($line['highlighted'] ? 'highlighted' : null), ), - $blame. - $line_text); + $blame); $rows = array_merge($rows, $this->renderInlines( idx($inlines, $line['line'], array()), diff --git a/src/applications/diffusion/controller/DiffusionHomeController.php b/src/applications/diffusion/controller/DiffusionHomeController.php index d06f0d9863..93d0330414 100644 --- a/src/applications/diffusion/controller/DiffusionHomeController.php +++ b/src/applications/diffusion/controller/DiffusionHomeController.php @@ -105,7 +105,7 @@ final class DiffusionHomeController extends DiffusionController { $branch = $repository->getDefaultArcanistBranch(); if (isset($lint_branches[$branch])) { $show_lint = true; - $lint_count = phutil_render_tag( + $lint_count = phutil_tag( 'a', array( 'href' => DiffusionRequest::generateDiffusionURI(array( diff --git a/src/applications/diffusion/view/DiffusionBrowseTableView.php b/src/applications/diffusion/view/DiffusionBrowseTableView.php index 2aed5dbdd3..e603b1aade 100644 --- a/src/applications/diffusion/view/DiffusionBrowseTableView.php +++ b/src/applications/diffusion/view/DiffusionBrowseTableView.php @@ -137,7 +137,7 @@ final class DiffusionBrowseTableView extends DiffusionView { $browse_link = ''.$this->linkBrowse( $base_path.$path->getPath().$dir_slash, array( - 'html' => $this->renderPathIcon( + 'text' => $this->renderPathIcon( 'dir', $browse_text), )).''; @@ -162,7 +162,7 @@ final class DiffusionBrowseTableView extends DiffusionView { $browse_link = $this->linkBrowse( $base_path.$path->getPath(), array( - 'html' => $this->renderPathIcon($type, $browse_text), + 'text' => $this->renderPathIcon($type, $browse_text), )); } diff --git a/src/applications/diffusion/view/DiffusionView.php b/src/applications/diffusion/view/DiffusionView.php index df5f139307..83dff57748 100644 --- a/src/applications/diffusion/view/DiffusionView.php +++ b/src/applications/diffusion/view/DiffusionView.php @@ -32,7 +32,7 @@ abstract class DiffusionView extends AphrontView { 'commit' => $commit_identifier, )); - return phutil_render_tag( + return phutil_tag( 'a', array( 'href' => $href, @@ -63,15 +63,13 @@ abstract class DiffusionView extends AphrontView { 'path' => $path, )); - if (isset($details['html'])) { - $text = $details['html']; - } else if (isset($details['text'])) { - $text = phutil_escape_html($details['text']); + if (isset($details['text'])) { + $text = $details['text']; } else { $text = 'Browse'; } - return phutil_render_tag( + return phutil_tag( 'a', array( 'href' => $href, @@ -87,7 +85,7 @@ abstract class DiffusionView extends AphrontView { 'id' => $hash, )); - return phutil_render_tag( + return phutil_tag( 'a', array( 'href' => $href, @@ -120,7 +118,7 @@ abstract class DiffusionView extends AphrontView { $commit_name = self::nameCommit($repository, $commit); $callsign = $repository->getCallsign(); - return phutil_render_tag( + return phutil_tag( 'a', array( 'href' => "/r{$callsign}{$commit}", @@ -133,7 +131,7 @@ abstract class DiffusionView extends AphrontView { return null; } - return phutil_render_tag( + return phutil_tag( 'a', array( 'href' => "/D{$id}", diff --git a/src/applications/directory/controller/PhabricatorDirectoryMainController.php b/src/applications/directory/controller/PhabricatorDirectoryMainController.php index 0302df17ec..b795ec238e 100644 --- a/src/applications/directory/controller/PhabricatorDirectoryMainController.php +++ b/src/applications/directory/controller/PhabricatorDirectoryMainController.php @@ -310,13 +310,14 @@ final class PhabricatorDirectoryMainController 'id' => $uniq_id, 'value' => $query, )); - $jump_caption = phutil_render_tag( + $jump_caption = phutil_tag( 'p', array( 'class' => 'phabricator-jump-nav-caption', ), - 'Enter the name of an object like D123 to quickly jump to '. - 'it. See '.$doc_link.' or type help.'); + new PhutilSafeHTML( + 'Enter the name of an object like D123 to quickly jump to '. + 'it. See '.$doc_link.' or type help.')); $panel = new AphrontPanelView(); $panel->setHeader('Jump Nav'); diff --git a/src/applications/feed/view/PhabricatorFeedStoryView.php b/src/applications/feed/view/PhabricatorFeedStoryView.php index 72b4a2a795..bf23a53890 100644 --- a/src/applications/feed/view/PhabricatorFeedStoryView.php +++ b/src/applications/feed/view/PhabricatorFeedStoryView.php @@ -97,7 +97,7 @@ final class PhabricatorFeedStoryView extends PhabricatorFeedView { $foot = ''; } - $foot = phutil_render_tag( + $foot = phutil_tag( 'div', array( 'class' => 'phabricator-feed-story-foot', @@ -111,7 +111,7 @@ final class PhabricatorFeedStoryView extends PhabricatorFeedView { require_celerity_resource('phabricator-feed-css'); - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => $this->oneLine @@ -119,7 +119,7 @@ final class PhabricatorFeedStoryView extends PhabricatorFeedView { : 'phabricator-feed-story', 'style' => $image_style, ), - $head.$body.$foot); + array($head, $body, $foot)); } } diff --git a/src/applications/files/controller/PhabricatorFileInfoController.php b/src/applications/files/controller/PhabricatorFileInfoController.php index 26a095af51..cea2272bdb 100644 --- a/src/applications/files/controller/PhabricatorFileInfoController.php +++ b/src/applications/files/controller/PhabricatorFileInfoController.php @@ -148,7 +148,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController { 'class' => 'phabricator-property-list-image', )); - $linked_image = phutil_render_tag( + $linked_image = phutil_tag( 'a', array( 'href' => $file->getViewURI(), diff --git a/src/applications/macro/controller/PhabricatorMacroListController.php b/src/applications/macro/controller/PhabricatorMacroListController.php index 3756d346a0..4a7560ec89 100644 --- a/src/applications/macro/controller/PhabricatorMacroListController.php +++ b/src/applications/macro/controller/PhabricatorMacroListController.php @@ -129,7 +129,7 @@ final class PhabricatorMacroListController } $datetime = phabricator_date($file->getDateCreated(), $viewer); $item->appendChild( - phutil_render_tag( + phutil_tag( 'div', array(), pht('Created on %s', $datetime))); diff --git a/src/applications/metamta/contentsource/PhabricatorContentSourceView.php b/src/applications/metamta/contentsource/PhabricatorContentSourceView.php index 5cd1278770..81ffda8de8 100644 --- a/src/applications/metamta/contentsource/PhabricatorContentSourceView.php +++ b/src/applications/metamta/contentsource/PhabricatorContentSourceView.php @@ -28,7 +28,7 @@ final class PhabricatorContentSourceView extends AphrontView { return; } - return phutil_render_tag( + return phutil_tag( 'span', array( 'class' => "phabricator-content-source-view", diff --git a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php index 563a2816f4..c3b0a927af 100644 --- a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php +++ b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php @@ -57,7 +57,7 @@ extends PhabricatorOAuthClientAuthorizationBaseController { ), $client->getName() ), - phutil_render_tag( + phutil_tag( 'a', array( 'href' => $scope_doc_href, diff --git a/src/applications/phame/view/PhamePostView.php b/src/applications/phame/view/PhamePostView.php index daae25dd53..582e32ccf7 100644 --- a/src/applications/phame/view/PhamePostView.php +++ b/src/applications/phame/view/PhamePostView.php @@ -123,26 +123,30 @@ final class PhamePostView extends AphrontView { } public function render() { - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'phame-post', ), - $this->renderTitle(). - $this->renderDatePublished(). - $this->renderBody(). - $this->renderComments()); + array( + $this->renderTitle(), + $this->renderDatePublished(), + $this->renderBody(), + $this->renderComments(), + )); } public function renderWithSummary() { - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'phame-post', ), - $this->renderTitle(). - $this->renderDatePublished(). - $this->renderSummary()); + array( + $this->renderTitle(), + $this->renderDatePublished(), + $this->renderSummary(), + )); } private function renderFacebookComments() { diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php index b24b00331b..1aa9625bf8 100644 --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -212,13 +212,13 @@ final class PhrictionDiffController } - return phutil_render_tag( + return phutil_tag( 'a', array( 'href' => '/phriction/edit/'.$document_id.'/?revert='.$version, 'class' => 'button', ), - 'Revert to Version '.phutil_escape_html($version).'...'); + 'Revert to Version '.$version.'...'); } private function renderComparisonTable(array $content) { diff --git a/src/applications/phriction/controller/PhrictionHistoryController.php b/src/applications/phriction/controller/PhrictionHistoryController.php index 29f92e4b0d..0f4bec40f7 100644 --- a/src/applications/phriction/controller/PhrictionHistoryController.php +++ b/src/applications/phriction/controller/PhrictionHistoryController.php @@ -82,7 +82,7 @@ final class PhrictionHistoryController $rows[] = array( phabricator_date($content->getDateCreated(), $user), phabricator_time($content->getDateCreated(), $user), - phutil_render_tag( + phutil_tag( 'a', array( 'href' => $slug_uri.'?v='.$version, diff --git a/src/applications/ponder/view/PonderCommentListView.php b/src/applications/ponder/view/PonderCommentListView.php index 566a975ef6..bef9942aa5 100644 --- a/src/applications/ponder/view/PonderCommentListView.php +++ b/src/applications/ponder/view/PonderCommentListView.php @@ -83,12 +83,12 @@ final class PonderCommentListView extends AphrontView { ''. ''; - $comment_markup = phutil_render_tag( + $comment_markup = phutil_tag( 'table', array( 'class' => 'ponder-comments', ), - implode("\n", $comment_markup) + new PhutilSafeHTML(implode("\n", $comment_markup)) ); diff --git a/src/applications/ponder/view/PonderUserProfileView.php b/src/applications/ponder/view/PonderUserProfileView.php index 0bd15efcfc..a05796c0b8 100644 --- a/src/applications/ponder/view/PonderUserProfileView.php +++ b/src/applications/ponder/view/PonderUserProfileView.php @@ -79,7 +79,7 @@ final class PonderUserProfileView extends AphrontView { $item->addAttribute( pht( 'Answer to %s', - phutil_render_tag( + phutil_tag( 'a', array( 'href' => '/Q'.$question->getID(), diff --git a/src/applications/search/view/PhabricatorSearchResultView.php b/src/applications/search/view/PhabricatorSearchResultView.php index 8e82d4ae03..b2a1aaafa9 100644 --- a/src/applications/search/view/PhabricatorSearchResultView.php +++ b/src/applications/search/view/PhabricatorSearchResultView.php @@ -34,7 +34,7 @@ final class PhabricatorSearchResultView extends AphrontView { require_celerity_resource('phabricator-search-results-css'); - $link = phutil_render_tag( + $link = phutil_tag( 'a', array( 'href' => $handle->getURI(), @@ -73,7 +73,7 @@ final class PhabricatorSearchResultView extends AphrontView { '
    '. $img. '
    '. - phutil_render_tag( + phutil_tag( 'a', array( 'class' => 'result-name', @@ -112,7 +112,7 @@ final class PhabricatorSearchResultView extends AphrontView { '\1', $str); } - return $str; + return phutil_safe_html($str); } } diff --git a/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php b/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php index 18a76bee96..b1e15f43e1 100644 --- a/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php +++ b/src/applications/slowvote/controller/PhabricatorSlowvotePollController.php @@ -223,12 +223,12 @@ final class PhabricatorSlowvotePollController } if ($comment_markup) { - $comment_markup = phutil_render_tag( + $comment_markup = phutil_tag( 'table', array( 'class' => 'phabricator-slowvote-comments', ), - implode("\n", $comment_markup)); + new PhutilSafeHTML(implode("\n", $comment_markup))); } else { $comment_markup = null; } @@ -301,12 +301,12 @@ final class PhabricatorSlowvotePollController $checked_class = null; } - return phutil_render_tag( + return phutil_tag( 'label', array( 'class' => 'phabricator-slowvote-label '.$checked_class, ), - $input.phutil_escape_html($option->getName())); + array($input, $option->getName())); } private function renderVoteCount( diff --git a/src/applications/uiexample/examples/JavelinUIExample.php b/src/applications/uiexample/examples/JavelinUIExample.php index 9b86f3f9a6..5c9096d1e8 100644 --- a/src/applications/uiexample/examples/JavelinUIExample.php +++ b/src/applications/uiexample/examples/JavelinUIExample.php @@ -53,13 +53,13 @@ final class JavelinUIExample extends PhabricatorUIExample { ), 'Toggle Blue Background'); - $div = phutil_render_tag( + $div = phutil_tag( 'div', array( 'id' => $container_id, 'class' => 'jxui-example-container jxui-blue-background', ), - $button_red.$button_blue); + array($button_red, $button_blue)); return array($div); } diff --git a/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php b/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php index db08dfbbfc..7bc8117519 100644 --- a/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php +++ b/src/applications/xhprof/view/PhabricatorXHProfSampleListView.php @@ -25,7 +25,7 @@ final class PhabricatorXHProfSampleListView extends AphrontView { $user_phids = mpull($this->samples, 'getUserPHID'); $users = id(new PhabricatorObjectHandleData($user_phids))->loadObjects(); foreach ($this->samples as $sample) { - $sample_link = phutil_render_tag( + $sample_link = phutil_tag( 'a', array( 'href' => '/xhprof/profile/'.$sample->getFilePHID().'/', diff --git a/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php b/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php index ba773721e1..f3aca0dc9f 100644 --- a/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php +++ b/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php @@ -100,12 +100,12 @@ final class PhabricatorInlineSummaryView extends AphrontView { } } - return phutil_render_tag( + return phutil_tag( 'table', array( 'class' => 'phabricator-inline-summary-table', ), - implode("\n", $rows)); + new PhutilSafeHTML(implode("\n", $rows))); } } diff --git a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleCountdown.php b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleCountdown.php index 1c5f976ec4..b2219ad428 100644 --- a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleCountdown.php +++ b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleCountdown.php @@ -46,19 +46,21 @@ final class PhabricatorRemarkupRuleCountdown extends PhutilRemarkupRule { foreach ($metadata as $id => $info) { list($time, $token) = $info; - $count = phutil_render_tag( + $count = phutil_tag( 'span', array( 'id' => $id, ), - javelin_render_tag('span', - array('sigil' => 'phabricator-timer-days'), '').'d'. - javelin_render_tag('span', - array('sigil' => 'phabricator-timer-hours'), '').'h'. - javelin_render_tag('span', - array('sigil' => 'phabricator-timer-minutes'), '').'m'. - javelin_render_tag('span', - array('sigil' => 'phabricator-timer-seconds'), '').'s'); + array( + javelin_render_tag('span', + array('sigil' => 'phabricator-timer-days'), '').'d', + javelin_render_tag('span', + array('sigil' => 'phabricator-timer-hours'), '').'h', + javelin_render_tag('span', + array('sigil' => 'phabricator-timer-minutes'), '').'m', + javelin_render_tag('span', + array('sigil' => 'phabricator-timer-seconds'), '').'s', + )); Javelin::initBehavior('countdown-timer', array( 'timestamp' => $time, 'container' => $id, diff --git a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleEmbedFile.php b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleEmbedFile.php index 72851c048d..6426f27fa0 100644 --- a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleEmbedFile.php +++ b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleEmbedFile.php @@ -151,7 +151,7 @@ final class PhabricatorRemarkupRuleEmbedFile } if ($layout_class) { - $embed = phutil_render_tag( + $embed = phutil_tag( 'div', array( 'class' => $layout_class, diff --git a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleObjectName.php b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleObjectName.php index 5d11ae0131..b81c37cc2f 100644 --- a/src/infrastructure/markup/rule/PhabricatorRemarkupRuleObjectName.php +++ b/src/infrastructure/markup/rule/PhabricatorRemarkupRuleObjectName.php @@ -40,7 +40,7 @@ abstract class PhabricatorRemarkupRuleObjectName } return $this->getEngine()->storeText( - phutil_render_tag( + phutil_tag( 'a', array( 'href' => $href, diff --git a/src/view/control/AphrontPagerView.php b/src/view/control/AphrontPagerView.php index a0d98d8dbe..00a405273d 100644 --- a/src/view/control/AphrontPagerView.php +++ b/src/view/control/AphrontPagerView.php @@ -187,7 +187,7 @@ final class AphrontPagerView extends AphrontView { list($index, $label, $class) = $link; $display_index = $this->getDisplayIndex($index); $link = $base_uri->alter($parameter, $display_index); - $rendered_links[] = phutil_render_tag( + $rendered_links[] = phutil_tag( 'a', array( 'href' => $link, diff --git a/src/view/control/AphrontTableView.php b/src/view/control/AphrontTableView.php index d723907554..92be011692 100644 --- a/src/view/control/AphrontTableView.php +++ b/src/view/control/AphrontTableView.php @@ -302,7 +302,7 @@ final class AphrontTableView extends AphrontView { // (alternatively, we could hard-code the line height). This is gross but // it's not clear that there's a better appraoch. - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'single-display-line-bounds', diff --git a/src/view/control/AphrontTokenizerTemplateView.php b/src/view/control/AphrontTokenizerTemplateView.php index 0eda5ec879..178b313873 100644 --- a/src/view/control/AphrontTokenizerTemplateView.php +++ b/src/view/control/AphrontTokenizerTemplateView.php @@ -53,15 +53,17 @@ final class AphrontTokenizerTemplateView extends AphrontView { 'type' => 'text', )); - return phutil_render_tag( + $content = $tokens; + $content[] = $input; + $content[] = phutil_tag('div', array('style' => 'clear: both;'), ''); + + return phutil_tag( 'div', array( 'id' => $id, 'class' => 'jx-tokenizer-container', ), - implode('', $tokens). - $input. - '
    '); + $content); } private function renderToken($key, $value) { @@ -69,20 +71,22 @@ final class AphrontTokenizerTemplateView extends AphrontView { if ($input_name) { $input_name .= '[]'; } - return phutil_render_tag( + return phutil_tag( 'a', array( 'class' => 'jx-tokenizer-token', ), - phutil_escape_html($value). - phutil_tag( - 'input', - array( - 'type' => 'hidden', - 'name' => $input_name, - 'value' => $key, - )). - ''); + array( + $value, + phutil_tag( + 'input', + array( + 'type' => 'hidden', + 'name' => $input_name, + 'value' => $key, + )). + phutil_tag('span', array('class' => 'jx-tokenizer-x-placeholder'), ''), + )); } } diff --git a/src/view/form/AphrontErrorView.php b/src/view/form/AphrontErrorView.php index d3dc20a0a3..0ff078261b 100644 --- a/src/view/form/AphrontErrorView.php +++ b/src/view/form/AphrontErrorView.php @@ -45,12 +45,12 @@ final class AphrontErrorView extends AphrontView { array(), $error); } - $list = phutil_render_tag( + $list = phutil_tag( 'ul', array( 'class' => 'aphront-error-view-list', ), - implode("\n", $list)); + $list); } else { $list = null; } @@ -79,13 +79,15 @@ final class AphrontErrorView extends AphrontView { 'id' => $this->id, 'class' => 'aphront-error-view '.$more_classes, ), - $title. - phutil_render_tag( - 'div', - array( - 'class' => 'aphront-error-view-body', - ), - $this->renderChildren(). - $list)); + array( + $title, + phutil_render_tag( + 'div', + array( + 'class' => 'aphront-error-view-body', + ), + $this->renderChildren(). + $list), + )); } } diff --git a/src/view/form/control/AphrontFormSelectControl.php b/src/view/form/control/AphrontFormSelectControl.php index bc01e742b3..9896eedef5 100644 --- a/src/view/form/control/AphrontFormSelectControl.php +++ b/src/view/form/control/AphrontFormSelectControl.php @@ -45,12 +45,12 @@ final class AphrontFormSelectControl extends AphrontFormControl { $tags = array(); foreach ($options as $value => $thing) { if (is_array($thing)) { - $tags[] = phutil_render_tag( + $tags[] = phutil_tag( 'optgroup', array( 'label' => $value, ), - implode("\n", self::renderOptions($selected, $thing))); + self::renderOptions($selected, $thing)); } else { $tags[] = phutil_tag( 'option', diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php index 6b601ff735..1272007c0c 100644 --- a/src/view/form/control/PhabricatorRemarkupControl.php +++ b/src/view/form/control/PhabricatorRemarkupControl.php @@ -118,12 +118,12 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { '')); } - $buttons = phutil_render_tag( + $buttons = phutil_tag( 'div', array( 'class' => 'remarkup-assist-bar', ), - implode('', $buttons)); + $buttons); $monospaced_textareas = null; $monospaced_textareas_class = null; diff --git a/src/view/layout/PhabricatorActionView.php b/src/view/layout/PhabricatorActionView.php index 5aa00d9ddc..b5a6cf5792 100644 --- a/src/view/layout/PhabricatorActionView.php +++ b/src/view/layout/PhabricatorActionView.php @@ -106,12 +106,12 @@ final class PhabricatorActionView extends AphrontView { $classes[] = 'phabricator-action-view-disabled'; } - return phutil_render_tag( + return phutil_tag( 'li', array( 'class' => implode(' ', $classes), ), - $icon.$item); + array($icon, $item)); } public static function getAvailableIcons() { diff --git a/src/view/layout/PhabricatorCrumbView.php b/src/view/layout/PhabricatorCrumbView.php index 2e422a1951..332d2f5465 100644 --- a/src/view/layout/PhabricatorCrumbView.php +++ b/src/view/layout/PhabricatorCrumbView.php @@ -80,13 +80,13 @@ final class PhabricatorCrumbView extends AphrontView { ''); } - return phutil_render_tag( + return phutil_tag( $this->href ? 'a' : 'span', array( 'href' => $this->href, 'class' => implode(' ', $classes), ), - $icon.$name.$divider); + array($icon, $name, $divider)); } diff --git a/src/view/layout/PhabricatorHeaderView.php b/src/view/layout/PhabricatorHeaderView.php index 8d2d7a911b..60a9e0655e 100644 --- a/src/view/layout/PhabricatorHeaderView.php +++ b/src/view/layout/PhabricatorHeaderView.php @@ -24,19 +24,22 @@ final class PhabricatorHeaderView extends AphrontView { public function render() { require_celerity_resource('phabricator-header-view-css'); - $header = phutil_escape_html($this->header); + $header = array($this->header); if ($this->objectName) { - $header = phutil_tag( - 'a', - array( - 'href' => '/'.$this->objectName, - ), - $this->objectName).' '.$header; + array_unshift( + $header, + phutil_tag( + 'a', + array( + 'href' => '/'.$this->objectName, + ), + $this->objectName), + ' '); } if ($this->tags) { - $header .= phutil_render_tag( + $header[] = phutil_render_tag( 'span', array( 'class' => 'phabricator-header-tags', @@ -49,7 +52,7 @@ final class PhabricatorHeaderView extends AphrontView { array( 'class' => 'phabricator-header-shell', ), - phutil_render_tag( + phutil_tag( 'h1', array( 'class' => 'phabricator-header-view', diff --git a/src/view/layout/PhabricatorObjectItemView.php b/src/view/layout/PhabricatorObjectItemView.php index 018cfe6ac3..662e63a783 100644 --- a/src/view/layout/PhabricatorObjectItemView.php +++ b/src/view/layout/PhabricatorObjectItemView.php @@ -100,20 +100,20 @@ final class PhabricatorObjectItemView extends AphrontView { ), $spec['label']); - $icon_list[] = phutil_render_tag( + $icon_list[] = phutil_tag( 'li', array( 'class' => 'phabricator-object-item-icon', ), - $label.$icon); + array($label, $icon)); } - $icons = phutil_render_tag( + $icons = phutil_tag( 'ul', array( 'class' => 'phabricator-object-item-icons', ), - implode('', $icon_list)); + $icon_list); } $attrs = null; @@ -135,12 +135,12 @@ final class PhabricatorObjectItemView extends AphrontView { ($first ? null : $spacer).$attribute); $first = false; } - $attrs = phutil_render_tag( + $attrs = phutil_tag( 'ul', array( 'class' => 'phabricator-object-item-attributes', ), - implode('', $attrs)); + $attrs); } $classes = array(); @@ -165,12 +165,12 @@ final class PhabricatorObjectItemView extends AphrontView { ), $header.$attrs.$this->renderChildren()); - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => implode(' ', $classes), ), - $icons.$content); + array($icons, $content)); } } diff --git a/src/view/layout/PhabricatorPinboardItemView.php b/src/view/layout/PhabricatorPinboardItemView.php index 7f97928c31..ed8b2e2998 100644 --- a/src/view/layout/PhabricatorPinboardItemView.php +++ b/src/view/layout/PhabricatorPinboardItemView.php @@ -34,7 +34,7 @@ final class PhabricatorPinboardItemView extends AphrontView { $header = null; if ($this->header) { $header = hsprintf('%s', $this->uri, $this->header); - $header = phutil_render_tag( + $header = phutil_tag( 'div', array( 'class' => 'phabricator-pinboard-item-header', @@ -66,14 +66,12 @@ final class PhabricatorPinboardItemView extends AphrontView { $content); } - return phutil_render_tag( + return phutil_tag( 'div', array( 'class' => 'phabricator-pinboard-item-view', ), - $header. - $image. - $content); + array($header, $image, $content)); } } diff --git a/src/view/layout/PhabricatorPropertyListView.php b/src/view/layout/PhabricatorPropertyListView.php index 4fb140b04b..d89ee97fb4 100644 --- a/src/view/layout/PhabricatorPropertyListView.php +++ b/src/view/layout/PhabricatorPropertyListView.php @@ -131,9 +131,13 @@ final class PhabricatorPropertyListView extends AphrontView { array( 'class' => 'phabricator-property-list-container', ), - $list. - '
    ' - ); + array( + $list, + phutil_tag( + 'div', + array('class' => 'phabriator-property-list-view-end'), + ''), + )); } private function renderSectionPart(array $part) { diff --git a/src/view/layout/PhabricatorTagView.php b/src/view/layout/PhabricatorTagView.php index 8755c048ef..c28ba9cecd 100644 --- a/src/view/layout/PhabricatorTagView.php +++ b/src/view/layout/PhabricatorTagView.php @@ -109,12 +109,12 @@ final class PhabricatorTagView extends AphrontView { $dot = null; } - $content = phutil_render_tag( + $content = phutil_tag( 'span', array( 'class' => 'phabricator-tag-core '.$color, ), - $dot.phutil_escape_html($this->name)); + array($dot, $this->name)); if ($this->barColor) { $barcolor = 'phabricator-tag-color-'.$this->barColor; @@ -129,13 +129,13 @@ final class PhabricatorTagView extends AphrontView { $bar = null; } - return phutil_render_tag( + return phutil_tag( $this->href ? 'a' : 'span', array( 'href' => $this->href, 'class' => implode(' ', $classes), ), - $bar.$content); + array($bar, $content)); } public static function getTagTypes() { diff --git a/src/view/layout/PhabricatorTimelineEventView.php b/src/view/layout/PhabricatorTimelineEventView.php index 7b0eb5546b..4359a5c9c0 100644 --- a/src/view/layout/PhabricatorTimelineEventView.php +++ b/src/view/layout/PhabricatorTimelineEventView.php @@ -273,7 +273,7 @@ final class PhabricatorTimelineEventView extends AphrontView { ->setAnchorName($this->anchor) ->render(); - $date = $anchor.phutil_render_tag( + $date = $anchor.phutil_tag( 'a', array( 'href' => '#'.$this->anchor, diff --git a/src/view/page/menu/PhabricatorMainMenuView.php b/src/view/page/menu/PhabricatorMainMenuView.php index 65bd6cddc0..a8ada196e7 100644 --- a/src/view/page/menu/PhabricatorMainMenuView.php +++ b/src/view/page/menu/PhabricatorMainMenuView.php @@ -327,14 +327,14 @@ final class PhabricatorMainMenuView extends AphrontView { $container_classes[] = 'alert-unread'; } - $bubble_tag = phutil_render_tag( + $bubble_tag = phutil_tag( 'a', array( 'href' => '/notification/', 'class' => implode(' ', $container_classes), 'id' => $bubble_id, ), - $icon_tag.$count_tag); + array($icon_tag, $count_tag)); Javelin::initBehavior( 'aphlict-dropdown',
    '.$addview->render().'