Convert simple phutil_render_tag() to phutil_tag()
Summary: Done manually. Test Plan: Loaded homepage. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4509
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
| @@ -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( | ||||
|         '<p>You were stopped here because <tt>debug.stop-on-redirect</tt> '. | ||||
|   | ||||
| @@ -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[] = '</table>'; | ||||
|  | ||||
|   | ||||
| @@ -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))); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -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', | ||||
|           ), | ||||
|           '<span>'.pht('Current Value:').'</span> '. | ||||
|           phutil_escape_html($current_value)); | ||||
|           array( | ||||
|             phutil_tag('span', array(), pht('Current Value:')), | ||||
|             ' '.$current_value, | ||||
|           )); | ||||
|  | ||||
|         $item->appendChild($current_value); | ||||
|       } | ||||
|   | ||||
| @@ -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, <strong>restart your webserver ". | ||||
|         "for the changes to take effect</strong>."); | ||||
|  | ||||
|       $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[] = '</tr>'; | ||||
|     } | ||||
|  | ||||
|     $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[] = '<li>'.$link.'</li>'; | ||||
|       } | ||||
|       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[] = '</tr>'; | ||||
|     } | ||||
|  | ||||
|     $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 '. | ||||
|         '<a href="%s">PHP Documentation</a>.', | ||||
|         '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, <strong>restart your ". | ||||
|         "webserver for the changes to take effect</strong>.")); | ||||
|         "webserver for the changes to take effect</strong>."))); | ||||
|  | ||||
|     return phutil_render_tag( | ||||
|     return phutil_tag( | ||||
|       'div', | ||||
|       array( | ||||
|         'class' => 'setup-issue-config', | ||||
|       ), | ||||
|       $table_info.$table.$info); | ||||
|       array($table_info, $table, $info)); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -66,7 +66,7 @@ final class PhabricatorDaemonLogListView extends AphrontView { | ||||
|           $symbol = '?'; | ||||
|       } | ||||
|  | ||||
|       $running = phutil_render_tag( | ||||
|       $running = phutil_tag( | ||||
|         'span', | ||||
|         array( | ||||
|           'style' => $style, | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -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'], | ||||
|   | ||||
| @@ -158,12 +158,12 @@ final class DifferentialChangesetListView extends AphrontView { | ||||
|           'Load'); | ||||
|       } | ||||
|       $detail->appendChild( | ||||
|         phutil_render_tag( | ||||
|         phutil_tag( | ||||
|           'div', | ||||
|           array( | ||||
|             'id' => $uniq_id, | ||||
|           ), | ||||
|           '<div class="differential-loading">'.$load.'</div>')); | ||||
|           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 = | ||||
|       '<table><tr>'. | ||||
|   | ||||
| @@ -137,7 +137,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView { | ||||
|       if ($cov === null) { | ||||
|         $mcov = $cov = '<em>-</em>'; | ||||
|       } else { | ||||
|         $mcov = phutil_render_tag( | ||||
|         $mcov = phutil_tag( | ||||
|           'div', | ||||
|           array( | ||||
|             'id' => 'differential-mcoverage-'.md5($fname), | ||||
|   | ||||
| @@ -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."; | ||||
|   | ||||
| @@ -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', | ||||
|   | ||||
| @@ -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()), | ||||
|   | ||||
| @@ -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( | ||||
|   | ||||
| @@ -137,7 +137,7 @@ final class DiffusionBrowseTableView extends DiffusionView { | ||||
|         $browse_link = '<strong>'.$this->linkBrowse( | ||||
|           $base_path.$path->getPath().$dir_slash, | ||||
|           array( | ||||
|             'html' => $this->renderPathIcon( | ||||
|             'text' => $this->renderPathIcon( | ||||
|               'dir', | ||||
|               $browse_text), | ||||
|           )).'</strong>'; | ||||
| @@ -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), | ||||
|           )); | ||||
|       } | ||||
|  | ||||
|   | ||||
| @@ -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}", | ||||
|   | ||||
| @@ -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', | ||||
|       ), | ||||
|       new PhutilSafeHTML( | ||||
|         'Enter the name of an object like <tt>D123</tt> to quickly jump to '. | ||||
|       'it. See '.$doc_link.' or type <tt>help</tt>.'); | ||||
|         'it. See '.$doc_link.' or type <tt>help</tt>.')); | ||||
|  | ||||
|     $panel = new AphrontPanelView(); | ||||
|     $panel->setHeader('Jump Nav'); | ||||
|   | ||||
| @@ -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)); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -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(), | ||||
|   | ||||
| @@ -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))); | ||||
|   | ||||
| @@ -28,7 +28,7 @@ final class PhabricatorContentSourceView extends AphrontView { | ||||
|       return; | ||||
|     } | ||||
|  | ||||
|     return phutil_render_tag( | ||||
|     return phutil_tag( | ||||
|       'span', | ||||
|       array( | ||||
|         'class' => "phabricator-content-source-view", | ||||
|   | ||||
| @@ -57,7 +57,7 @@ extends PhabricatorOAuthClientAuthorizationBaseController { | ||||
|           ), | ||||
|           $client->getName() | ||||
|         ), | ||||
|         phutil_render_tag( | ||||
|         phutil_tag( | ||||
|           'a', | ||||
|           array( | ||||
|             'href' => $scope_doc_href, | ||||
|   | ||||
| @@ -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() { | ||||
|   | ||||
| @@ -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) { | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -83,12 +83,12 @@ final class PonderCommentListView extends AphrontView { | ||||
|        '<td>'.$addview->render().'</td>'. | ||||
|       '</tr>'; | ||||
|  | ||||
|     $comment_markup = phutil_render_tag( | ||||
|     $comment_markup = phutil_tag( | ||||
|       'table', | ||||
|       array( | ||||
|         'class' => 'ponder-comments', | ||||
|       ), | ||||
|       implode("\n", $comment_markup) | ||||
|       new PhutilSafeHTML(implode("\n", $comment_markup)) | ||||
|     ); | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -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(), | ||||
|   | ||||
| @@ -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 { | ||||
|       '<div class="phabricator-search-result">'. | ||||
|         $img. | ||||
|         '<div class="result-desc">'. | ||||
|           phutil_render_tag( | ||||
|           phutil_tag( | ||||
|             'a', | ||||
|             array( | ||||
|               'class' => 'result-name', | ||||
| @@ -112,7 +112,7 @@ final class PhabricatorSearchResultView extends AphrontView { | ||||
|         '<strong>\1</strong>', | ||||
|         $str); | ||||
|     } | ||||
|     return $str; | ||||
|     return phutil_safe_html($str); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -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( | ||||
|   | ||||
| @@ -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); | ||||
|   } | ||||
|   | ||||
| @@ -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().'/', | ||||
|   | ||||
| @@ -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))); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -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, | ||||
|         ), | ||||
|         array( | ||||
|           javelin_render_tag('span', | ||||
|           array('sigil' => 'phabricator-timer-days'), '').'d'. | ||||
|             array('sigil' => 'phabricator-timer-days'), '').'d', | ||||
|           javelin_render_tag('span', | ||||
|           array('sigil' => 'phabricator-timer-hours'), '').'h'. | ||||
|             array('sigil' => 'phabricator-timer-hours'), '').'h', | ||||
|           javelin_render_tag('span', | ||||
|           array('sigil' => 'phabricator-timer-minutes'), '').'m'. | ||||
|             array('sigil' => 'phabricator-timer-minutes'), '').'m', | ||||
|           javelin_render_tag('span', | ||||
|           array('sigil' => 'phabricator-timer-seconds'), '').'s'); | ||||
|             array('sigil' => 'phabricator-timer-seconds'), '').'s', | ||||
|         )); | ||||
|       Javelin::initBehavior('countdown-timer', array( | ||||
|         'timestamp' => $time, | ||||
|         'container' => $id, | ||||
|   | ||||
| @@ -151,7 +151,7 @@ final class PhabricatorRemarkupRuleEmbedFile | ||||
|         } | ||||
|  | ||||
|         if ($layout_class) { | ||||
|           $embed = phutil_render_tag( | ||||
|           $embed = phutil_tag( | ||||
|             'div', | ||||
|             array( | ||||
|               'class' => $layout_class, | ||||
|   | ||||
| @@ -40,7 +40,7 @@ abstract class PhabricatorRemarkupRuleObjectName | ||||
|     } | ||||
|  | ||||
|     return $this->getEngine()->storeText( | ||||
|       phutil_render_tag( | ||||
|       phutil_tag( | ||||
|         'a', | ||||
|         array( | ||||
|           'href' => $href, | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -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', | ||||
|   | ||||
| @@ -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. | ||||
|       '<div style="clear: both;"></div>'); | ||||
|       $content); | ||||
|   } | ||||
|  | ||||
|   private function renderToken($key, $value) { | ||||
| @@ -69,12 +71,13 @@ 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). | ||||
|       array( | ||||
|         $value, | ||||
|         phutil_tag( | ||||
|           'input', | ||||
|           array( | ||||
| @@ -82,7 +85,8 @@ final class AphrontTokenizerTemplateView extends AphrontView { | ||||
|             'name'  => $input_name, | ||||
|             'value' => $key, | ||||
|           )). | ||||
|       '<span class="jx-tokenizer-x-placeholder"></span>'); | ||||
|         phutil_tag('span', array('class' => 'jx-tokenizer-x-placeholder'), ''), | ||||
|       )); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -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. | ||||
|       array( | ||||
|         $title, | ||||
|         phutil_render_tag( | ||||
|           'div', | ||||
|           array( | ||||
|             'class' => 'aphront-error-view-body', | ||||
|           ), | ||||
|           $this->renderChildren(). | ||||
|         $list)); | ||||
|           $list), | ||||
|       )); | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -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', | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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() { | ||||
|   | ||||
| @@ -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)); | ||||
|   } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -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( | ||||
|       array_unshift( | ||||
|         $header, | ||||
|         phutil_tag( | ||||
|           'a', | ||||
|           array( | ||||
|             'href' => '/'.$this->objectName, | ||||
|           ), | ||||
|         $this->objectName).' '.$header; | ||||
|           $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', | ||||
|   | ||||
| @@ -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)); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -34,7 +34,7 @@ final class PhabricatorPinboardItemView extends AphrontView { | ||||
|     $header = null; | ||||
|     if ($this->header) { | ||||
|       $header = hsprintf('<a href="%s">%s</a>', $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)); | ||||
|   } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -131,9 +131,13 @@ final class PhabricatorPropertyListView extends AphrontView { | ||||
|         array( | ||||
|           'class' => 'phabricator-property-list-container', | ||||
|         ), | ||||
|         $list. | ||||
|         '<div class="phabriator-property-list-view-end"></div>' | ||||
|       ); | ||||
|         array( | ||||
|           $list, | ||||
|           phutil_tag( | ||||
|             'div', | ||||
|             array('class' => 'phabriator-property-list-view-end'), | ||||
|             ''), | ||||
|         )); | ||||
|   } | ||||
|  | ||||
|   private function renderSectionPart(array $part) { | ||||
|   | ||||
| @@ -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() { | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
| @@ -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', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 vrana
					vrana