diff --git a/src/applications/differential/view/DifferentialChangesetDetailView.php b/src/applications/differential/view/DifferentialChangesetDetailView.php index 3810325ea2..e010d4e539 100644 --- a/src/applications/differential/view/DifferentialChangesetDetailView.php +++ b/src/applications/differential/view/DifferentialChangesetDetailView.php @@ -101,7 +101,7 @@ final class DifferentialChangesetDetailView extends AphrontView { $buttons, phutil_tag('h1', array(), $display_filename), phutil_tag('div', array('style' => 'clear: both'), ''), - $this->renderHTMLChildren(), + $this->renderChildren(), ))); } diff --git a/src/applications/differential/view/DifferentialInlineCommentEditView.php b/src/applications/differential/view/DifferentialInlineCommentEditView.php index 5bc2bbdb4a..193e3520ca 100644 --- a/src/applications/differential/view/DifferentialInlineCommentEditView.php +++ b/src/applications/differential/view/DifferentialInlineCommentEditView.php @@ -123,7 +123,7 @@ final class DifferentialInlineCommentEditView extends AphrontView { array( 'class' => 'differential-inline-comment-edit-body', ), - $this->renderHTMLChildren()); + $this->renderChildren()); $edit = phutil_tag( 'edit', diff --git a/src/applications/differential/view/DifferentialPrimaryPaneView.php b/src/applications/differential/view/DifferentialPrimaryPaneView.php index 8e1e8602ef..cfa4215fd5 100644 --- a/src/applications/differential/view/DifferentialPrimaryPaneView.php +++ b/src/applications/differential/view/DifferentialPrimaryPaneView.php @@ -17,7 +17,7 @@ final class DifferentialPrimaryPaneView extends AphrontView { 'class' => 'differential-primary-pane', 'id' => $this->id, ), - $this->renderHTMLChildren()); + $this->renderChildren()); } } diff --git a/src/applications/feed/view/PhabricatorFeedStoryView.php b/src/applications/feed/view/PhabricatorFeedStoryView.php index 468ce0c802..0ddca8df06 100644 --- a/src/applications/feed/view/PhabricatorFeedStoryView.php +++ b/src/applications/feed/view/PhabricatorFeedStoryView.php @@ -89,7 +89,7 @@ final class PhabricatorFeedStoryView extends PhabricatorFeedView { array( 'class' => 'phabricator-feed-story-body', ), - phutil_safe_html($this->renderChildren())); + phutil_safe_html(implode('', $this->renderChildren()))); if ($this->epoch) { $foot = phabricator_datetime($this->epoch, $this->user); diff --git a/src/applications/ponder/view/PonderVotableView.php b/src/applications/ponder/view/PonderVotableView.php index e94777ef91..11cbe6cde0 100644 --- a/src/applications/ponder/view/PonderVotableView.php +++ b/src/applications/ponder/view/PonderVotableView.php @@ -85,7 +85,7 @@ final class PonderVotableView extends AphrontView { array( 'class' => 'ponder-votebox-content', ), - $this->renderHTMLChildren()), + $this->renderChildren()), )); } diff --git a/src/applications/uiexample/examples/JavelinViewExampleServerView.php b/src/applications/uiexample/examples/JavelinViewExampleServerView.php index 0f996df1c3..2d59917a7c 100644 --- a/src/applications/uiexample/examples/JavelinViewExampleServerView.php +++ b/src/applications/uiexample/examples/JavelinViewExampleServerView.php @@ -8,7 +8,7 @@ final class JavelinViewExampleServerView extends AphrontView { array( 'class' => 'server-view', ), - $this->renderHTMLChildren()); + $this->renderChildren()); } } diff --git a/src/docs/developer/rendering_html.diviner b/src/docs/developer/rendering_html.diviner index 48f600f616..54b410a3af 100644 --- a/src/docs/developer/rendering_html.diviner +++ b/src/docs/developer/rendering_html.diviner @@ -124,14 +124,6 @@ return `phutil_tag()` or `javelin_tag()`: return phutil_tag('div', ...); -@{class:AphrontView} subclasses can use `renderHTMLChildren()` and -`renderSingleView()` to build @{class@libphutil:PhutilSafeHTML} objects from -children or arbitrary lists of components. - -@{class:AphrontView} subclasses should avoid `renderChildren()` and transition -callers to `renderHTMLChildren()`. This older method does not return -@{class@libphutil:PhutilSafeHTML} objects. - = Internationalization: pht() = The @{function:pht} function has some special rules. If any input to diff --git a/src/view/AphrontDialogView.php b/src/view/AphrontDialogView.php index 78e3a4170f..5b448678bb 100644 --- a/src/view/AphrontDialogView.php +++ b/src/view/AphrontDialogView.php @@ -158,7 +158,7 @@ final class AphrontDialogView extends AphrontView { } $buttons[] = phutil_tag('div', array('style' => 'clear: both;'), ''); - $children = $this->renderHTMLChildren(); + $children = $this->renderChildren(); $content = hsprintf( '%s%s%s', diff --git a/src/view/AphrontJavelinView.php b/src/view/AphrontJavelinView.php index 832d0c3178..a563c4aecb 100644 --- a/src/view/AphrontJavelinView.php +++ b/src/view/AphrontJavelinView.php @@ -32,7 +32,7 @@ final class AphrontJavelinView extends AphrontView { 'id' => $id, 'view' => $this->getName(), 'params' => $this->getParameters(), - 'children' => $this->renderChildren(), + 'children' => implode('', $this->renderChildren()), 'trigger_id' => $render_context, )); diff --git a/src/view/AphrontNullView.php b/src/view/AphrontNullView.php index df61ab81f3..2a218e700a 100644 --- a/src/view/AphrontNullView.php +++ b/src/view/AphrontNullView.php @@ -3,7 +3,7 @@ final class AphrontNullView extends AphrontView { public function render() { - return $this->renderHTMLChildren(); + return phutil_implode_html('', $this->renderChildren()); } } diff --git a/src/view/AphrontTagView.php b/src/view/AphrontTagView.php index 8e9595f0b6..514c8826f6 100644 --- a/src/view/AphrontTagView.php +++ b/src/view/AphrontTagView.php @@ -87,7 +87,7 @@ abstract class AphrontTagView extends AphrontView { } protected function getTagContent() { - return $this->renderHTMLChildren(); + return $this->renderChildren(); } protected function willRender() { diff --git a/src/view/AphrontView.php b/src/view/AphrontView.php index b5bf238f7d..59c7a2172a 100644 --- a/src/view/AphrontView.php +++ b/src/view/AphrontView.php @@ -29,14 +29,6 @@ abstract class AphrontView extends Phobject { } final protected function renderChildren() { - $out = array(); - foreach ($this->children as $child) { - $out[] = $this->renderSingleView($child); - } - return implode('', $out); - } - - final protected function renderHTMLChildren() { $out = array(); foreach ($this->children as $child) { $out[] = $this->renderSingleView($child); diff --git a/src/view/form/AphrontErrorView.php b/src/view/form/AphrontErrorView.php index cd97ff6a2f..938f0ae9ec 100644 --- a/src/view/form/AphrontErrorView.php +++ b/src/view/form/AphrontErrorView.php @@ -92,7 +92,7 @@ final class AphrontErrorView extends AphrontView { $classes[] = 'aphront-error-severity-'.$this->severity; $classes = implode(' ', $classes); - $children = $this->renderHTMLChildren(); + $children = $this->renderChildren(); $children[] = $list; return phutil_tag( diff --git a/src/view/form/AphrontFormInsetView.php b/src/view/form/AphrontFormInsetView.php index 014cdfffdd..1e504c4598 100644 --- a/src/view/form/AphrontFormInsetView.php +++ b/src/view/form/AphrontFormInsetView.php @@ -102,7 +102,7 @@ final class AphrontFormInsetView extends AphrontView { $content[] = $this->content; } - $content = array_merge($content, $this->renderHTMLChildren()); + $content = array_merge($content, $this->renderChildren()); return phutil_tag('div', $div_attributes, $content); } diff --git a/src/view/form/AphrontFormLayoutView.php b/src/view/form/AphrontFormLayoutView.php index 300c7370e0..83561491bb 100644 --- a/src/view/form/AphrontFormLayoutView.php +++ b/src/view/form/AphrontFormLayoutView.php @@ -38,6 +38,6 @@ final class AphrontFormLayoutView extends AphrontView { array( 'class' => $classes, ), - $this->renderHTMLChildren()); + $this->renderChildren()); } } diff --git a/src/view/form/AphrontFormView.php b/src/view/form/AphrontFormView.php index 76342830b8..5d5af2a430 100644 --- a/src/view/form/AphrontFormView.php +++ b/src/view/form/AphrontFormView.php @@ -68,7 +68,7 @@ final class AphrontFormView extends AphrontView { $layout ->appendChild($this->renderDataInputs()) - ->appendChild($this->renderHTMLChildren()); + ->appendChild($this->renderChildren()); if (!$this->user) { throw new Exception('You must pass the user to AphrontFormView.'); diff --git a/src/view/layout/AphrontContextBarView.php b/src/view/layout/AphrontContextBarView.php index 0b4d1e9499..07c640fbb5 100644 --- a/src/view/layout/AphrontContextBarView.php +++ b/src/view/layout/AphrontContextBarView.php @@ -24,7 +24,7 @@ final class AphrontContextBarView extends AphrontView { '
'. '', $view->render(), - $this->renderHTMLChildren()); + $this->renderChildren()); } } diff --git a/src/view/layout/AphrontListFilterView.php b/src/view/layout/AphrontListFilterView.php index 2f14ec83f0..cca43fa770 100644 --- a/src/view/layout/AphrontListFilterView.php +++ b/src/view/layout/AphrontListFilterView.php @@ -10,7 +10,7 @@ final class AphrontListFilterView extends AphrontView { '