diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php index 9f1b37bd15..751079b316 100644 --- a/src/applications/conpherence/controller/ConpherenceViewController.php +++ b/src/applications/conpherence/controller/ConpherenceViewController.php @@ -237,14 +237,13 @@ final class ConpherenceViewController extends foreach ($files as $file) { $thumb = $file->getThumb60x45URI(); $table_data[] = array( - phutil_render_tag( + phutil_tag( 'img', array( 'src' => $thumb ), - '' - ), - $file->getName() + ''), + phutil_escape_html($file->getName()), ); } $header = id(new PhabricatorHeaderView()) @@ -274,13 +273,12 @@ final class ConpherenceViewController extends foreach ($actual_tasks as $task) { $data[] = array( idx($priority_map, $task->getPriority(), pht('???')), - phutil_render_tag( + phutil_tag( 'a', array( 'href' => '/T'.$task->getID() ), - phutil_escape_html($task->getTitle()) - ) + $task->getTitle()), ); } $table = id(new AphrontTableView($data)) diff --git a/src/applications/diffusion/query/browse/DiffusionBrowseQuery.php b/src/applications/diffusion/query/browse/DiffusionBrowseQuery.php index 358815c600..832f4784d9 100644 --- a/src/applications/diffusion/query/browse/DiffusionBrowseQuery.php +++ b/src/applications/diffusion/query/browse/DiffusionBrowseQuery.php @@ -111,8 +111,7 @@ abstract class DiffusionBrowseQuery { $readme_content = $content_query->getRawData(); if (preg_match('/\\.txt$/', $readme->getPath())) { - $readme_content = phutil_escape_html($readme_content); - $readme_content = nl2br($readme_content); + $readme_content = phutil_escape_html_newlines($readme_content); $class = null; } else if (preg_match('/\\.rainbow$/', $readme->getPath())) { @@ -121,6 +120,7 @@ abstract class DiffusionBrowseQuery { ->getHighlightFuture($readme_content) ->resolve(); $readme_content = nl2br($readme_content); + $readme_content = phutil_safe_html($readme_content); require_celerity_resource('syntax-highlighting-css'); $class = 'remarkup-code'; @@ -132,7 +132,7 @@ abstract class DiffusionBrowseQuery { $class = 'phabricator-remarkup'; } - $readme_content = phutil_render_tag( + $readme_content = phutil_tag( 'div', array( 'class' => $class, diff --git a/src/applications/diffusion/view/DiffusionBranchTableView.php b/src/applications/diffusion/view/DiffusionBranchTableView.php index 2d59c04946..9626ee8db0 100644 --- a/src/applications/diffusion/view/DiffusionBranchTableView.php +++ b/src/applications/diffusion/view/DiffusionBranchTableView.php @@ -61,8 +61,7 @@ final class DiffusionBranchTableView extends DiffusionView { $drequest->getRepository(), $branch->getHeadCommitIdentifier()), $datetime, - AphrontTableView::renderSingleDisplayLine( - phutil_escape_html($details)) + AphrontTableView::renderSingleDisplayLine($details), // TODO: etc etc ); if ($branch->getName() == $current_branch) { diff --git a/src/applications/diffusion/view/DiffusionBrowseTableView.php b/src/applications/diffusion/view/DiffusionBrowseTableView.php index 0df7e7eb48..2d85e1cc06 100644 --- a/src/applications/diffusion/view/DiffusionBrowseTableView.php +++ b/src/applications/diffusion/view/DiffusionBrowseTableView.php @@ -59,8 +59,7 @@ final class DiffusionBrowseTableView extends DiffusionView { } } - $details = AphrontTableView::renderSingleDisplayLine( - phutil_escape_html($data->getSummary())); + $details = AphrontTableView::renderSingleDisplayLine($data->getSummary()); } else { $author = ''; $details = ''; diff --git a/src/applications/diffusion/view/DiffusionHistoryTableView.php b/src/applications/diffusion/view/DiffusionHistoryTableView.php index 08784f71f7..bd35f8134f 100644 --- a/src/applications/diffusion/view/DiffusionHistoryTableView.php +++ b/src/applications/diffusion/view/DiffusionHistoryTableView.php @@ -138,8 +138,7 @@ final class DiffusionHistoryTableView extends DiffusionView { $date, $time, $author, - AphrontTableView::renderSingleDisplayLine( - phutil_escape_html($history->getSummary())), + AphrontTableView::renderSingleDisplayLine($history->getSummary()), // TODO: etc etc ); } diff --git a/src/applications/directory/controller/PhabricatorDirectoryMainController.php b/src/applications/directory/controller/PhabricatorDirectoryMainController.php index b795ec238e..15eeda8453 100644 --- a/src/applications/directory/controller/PhabricatorDirectoryMainController.php +++ b/src/applications/directory/controller/PhabricatorDirectoryMainController.php @@ -338,11 +338,14 @@ final class PhabricatorDirectoryMainController private function renderMiniPanel($title, $body) { $panel = new AphrontMiniPanelView(); $panel->appendChild( - phutil_render_tag( + phutil_tag( 'p', array( ), - ''.$title.': '.$body)); + array( + phutil_tag('strong', array(), $title.':'), + $body + ))); $this->minipanels[] = $panel; } diff --git a/src/applications/ponder/view/PonderVotableView.php b/src/applications/ponder/view/PonderVotableView.php index c4bb4ab726..a00e6bee07 100644 --- a/src/applications/ponder/view/PonderVotableView.php +++ b/src/applications/ponder/view/PonderVotableView.php @@ -73,18 +73,20 @@ final class PonderVotableView extends AphrontView { 'vote' => (int)$this->vote, ), ), - javelin_render_tag( - 'div', - array( - 'class' => 'ponder-votebox', - ), - $up.$count.$down). - phutil_render_tag( - 'div', - array( - 'class' => 'ponder-votebox-content', - ), - $this->renderChildren())); + array( + javelin_tag( + 'div', + array( + 'class' => 'ponder-votebox', + ), + array($up, $count, $down)), + phutil_render_tag( + 'div', + array( + 'class' => 'ponder-votebox-content', + ), + $this->renderChildren()), + )); } } diff --git a/src/applications/uiexample/examples/JavelinViewExampleServerView.php b/src/applications/uiexample/examples/JavelinViewExampleServerView.php index ba02d27cd9..2d59917a7c 100644 --- a/src/applications/uiexample/examples/JavelinViewExampleServerView.php +++ b/src/applications/uiexample/examples/JavelinViewExampleServerView.php @@ -1,11 +1,14 @@ 'server-view'), - $this->renderChildren() - ); + array( + 'class' => 'server-view', + ), + $this->renderChildren()); } + } diff --git a/src/view/control/AphrontTableView.php b/src/view/control/AphrontTableView.php index ace3c7b9d1..10c723c96a 100644 --- a/src/view/control/AphrontTableView.php +++ b/src/view/control/AphrontTableView.php @@ -311,12 +311,15 @@ final class AphrontTableView extends AphrontView { array( 'class' => 'single-display-line-bounds', ), - phutil_render_tag( - 'span', - array( - 'class' => 'single-display-line-content', - ), - $line).' '); + array( + phutil_tag( + 'span', + array( + 'class' => 'single-display-line-content', + ), + $line), + "\xC2\xA0", + )); }