diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php index 42c80f5f6f..1d940c32d1 100644 --- a/src/aphront/AphrontRequest.php +++ b/src/aphront/AphrontRequest.php @@ -9,7 +9,7 @@ final class AphrontRequest { // NOTE: These magic request-type parameters are automatically included in - // certain requests (e.g., by phabricator_form(), JX.Request, + // certain requests (e.g., by phabricator_render_form(), JX.Request, // JX.Workflow, and ConduitClient) and help us figure out what sort of // response the client expects. diff --git a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php index 44de55a4d3..1981ee4428 100644 --- a/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php +++ b/src/aphront/configuration/AphrontDefaultApplicationConfiguration.php @@ -210,7 +210,7 @@ class AphrontDefaultApplicationConfiguration if ($ex instanceof AphrontUsageException) { $error = new AphrontErrorView(); - $error->setTitle($ex->getTitle()); + $error->setTitle(phutil_escape_html($ex->getTitle())); $error->appendChild($ex->getMessage()); $view = new PhabricatorStandardPageView(); @@ -227,8 +227,8 @@ class AphrontDefaultApplicationConfiguration // Always log the unhandled exception. phlog($ex); - $class = get_class($ex); - $message = $ex->getMessage(); + $class = phutil_escape_html(get_class($ex)); + $message = phutil_escape_html($ex->getMessage()); if ($ex instanceof AphrontQuerySchemaException) { $message .= @@ -244,13 +244,11 @@ class AphrontDefaultApplicationConfiguration $trace = null; } - $content = hsprintf( + $content = '
%s'. - '
'. + $details.''. + '
'.$forbidden_text.'
'); $view = new PhabricatorStandardPageView(); $view->setTitle('403 Forbidden'); diff --git a/src/aphront/response/Aphront404Response.php b/src/aphront/response/Aphront404Response.php index fbfa41a0da..2821012fc4 100644 --- a/src/aphront/response/Aphront404Response.php +++ b/src/aphront/response/Aphront404Response.php @@ -12,8 +12,7 @@ final class Aphront404Response extends AphrontHTMLResponse { public function buildResponseString() { $failure = new AphrontRequestFailureView(); $failure->setHeader('404 Not Found'); - $failure->appendChild(phutil_tag('p', array(), pht( - 'The page you requested was not found.'))); + $failure->appendChild('The page you requested was not found.
'); $view = new PhabricatorStandardPageView(); $view->setTitle('404 Not Found'); diff --git a/src/aphront/response/AphrontWebpageResponse.php b/src/aphront/response/AphrontWebpageResponse.php index 9bc2a54e83..4083b1be88 100644 --- a/src/aphront/response/AphrontWebpageResponse.php +++ b/src/aphront/response/AphrontWebpageResponse.php @@ -13,7 +13,7 @@ final class AphrontWebpageResponse extends AphrontHTMLResponse { } public function buildResponseString() { - return hsprintf('%s', $this->content); + return $this->content; } } diff --git a/src/applications/audit/controller/PhabricatorAuditListController.php b/src/applications/audit/controller/PhabricatorAuditListController.php index d776fe12fd..d858dec6bf 100644 --- a/src/applications/audit/controller/PhabricatorAuditListController.php +++ b/src/applications/audit/controller/PhabricatorAuditListController.php @@ -335,7 +335,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { } if ($handle) { - $handle_name = $handle->getName(); + $handle_name = phutil_escape_html($handle->getName()); } else { $handle_name = null; } @@ -435,7 +435,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { } if ($handle) { - $handle_name = $handle->getName(); + $handle_name = phutil_escape_html($handle->getName()); } else { $handle_name = null; } diff --git a/src/applications/audit/view/PhabricatorAuditCommitListView.php b/src/applications/audit/view/PhabricatorAuditCommitListView.php index dc674cec8b..6987fa117e 100644 --- a/src/applications/audit/view/PhabricatorAuditCommitListView.php +++ b/src/applications/audit/view/PhabricatorAuditCommitListView.php @@ -70,10 +70,10 @@ final class PhabricatorAuditCommitListView extends AphrontView { $rows[] = array( $commit_name, $author_name, - $commit->getCommitData()->getSummary(), + phutil_escape_html($commit->getCommitData()->getSummary()), PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus()), - phutil_implode_html(', ', $auditors), + implode(', ', $auditors), phabricator_datetime($commit->getEpoch(), $this->user), ); } diff --git a/src/applications/audit/view/PhabricatorAuditListView.php b/src/applications/audit/view/PhabricatorAuditListView.php index 5a7ef11a1f..2bac041aa1 100644 --- a/src/applications/audit/view/PhabricatorAuditListView.php +++ b/src/applications/audit/view/PhabricatorAuditListView.php @@ -129,7 +129,10 @@ final class PhabricatorAuditListView extends AphrontView { } $reasons = $audit->getAuditReasons(); - $reasons = phutil_implode_html(phutil_tag('br'), $reasons); + foreach ($reasons as $key => $reason) { + $reasons[$key] = phutil_escape_html($reason); + } + $reasons = implode(''.pht('Your account has been disabled.').'
'); return $this->buildStandardPageResponse( $failure_view, diff --git a/src/applications/auth/controller/PhabricatorEmailLoginController.php b/src/applications/auth/controller/PhabricatorEmailLoginController.php index 3875de3c62..e6cc6372df 100644 --- a/src/applications/auth/controller/PhabricatorEmailLoginController.php +++ b/src/applications/auth/controller/PhabricatorEmailLoginController.php @@ -98,8 +98,10 @@ EOBODY; $view = new AphrontRequestFailureView(); $view->setHeader(pht('Check Your Email')); - $view->appendChild(phutil_tag('p', array(), pht( - 'An email has been sent with a link you can use to login.'))); + $view->appendChild( + ''.pht( + 'An email has been sent with a link you can use to login.' + ).'
'); return $this->buildStandardPageResponse( $view, array( @@ -138,8 +140,8 @@ EOBODY; $panel = new AphrontPanelView(); $panel->setWidth(AphrontPanelView::WIDTH_FORM); - $panel->appendChild(phutil_tag('h1', array(), pht( - 'Forgot Password / Email Login'))); + $panel->appendChild(' +'.pht('The authentication information in the link you clicked is '. 'invalid or out of date. Make sure you are copy-and-pasting the '. 'entire link into your browser. You can try again, or request '. - 'a new email.'))); - $view->appendChild(hsprintf( + 'a new email.').'
'); + $view->appendChild( ''.pht('The LDAP account you just authorized is already '. 'linked toanother Phabricator account. Before you can link it '. 'to a different LDAP account, you must unlink the old '. - 'account.'))); + 'account.').'
' + ); $dialog->addCancelButton('/settings/panel/ldap/'); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -61,8 +62,10 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController { $dialog = new AphrontDialogView(); $dialog->setUser($current_user); $dialog->setTitle(pht('Link LDAP Account')); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Link your LDAP account to your Phabricator account?'))); + $dialog->appendChild( + ''. + pht('Link your LDAP account to your Phabricator account?'). + '
'); $dialog->addHiddenInput('username', $request->getStr('username')); $dialog->addHiddenInput('password', $request->getStr('password')); $dialog->addSubmitButton(pht('Link Accounts')); @@ -131,10 +134,9 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController { $panel = new AphrontPanelView(); $panel->setWidth(AphrontPanelView::WIDTH_FORM); - $panel->appendChild(phutil_tag('h1', array(), pht('LDAP login'))); + $panel->appendChild(''.pht('You will not be able to login using this account '. + 'once you unlink it. Continue?').'
'); $dialog->addSubmitButton(pht('Unlink Account')); $dialog->addCancelButton('/settings/panel/ldap/'); diff --git a/src/applications/auth/controller/PhabricatorLoginController.php b/src/applications/auth/controller/PhabricatorLoginController.php index f4bb0ab57a..23de5e7f2d 100644 --- a/src/applications/auth/controller/PhabricatorLoginController.php +++ b/src/applications/auth/controller/PhabricatorLoginController.php @@ -29,8 +29,7 @@ final class PhabricatorLoginController $dialog = new AphrontDialogView(); $dialog->setUser($user); $dialog->setTitle(pht('Login Required')); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'You must login to continue.'))); + $dialog->appendChild(''.pht('You must login to continue.').'
'); $dialog->addSubmitButton(pht('Login')); $dialog->addCancelButton('/', pht('Cancel')); @@ -247,7 +246,8 @@ final class PhabricatorLoginController $title = pht("Login or Register with %s", $provider_name); $body = pht('Login or register for Phabricator using your %s account.', $provider_name); - $button = pht("Login or Register with %s", $provider_name); + $button = pht("Login or Register with %s", + phutil_escape_html($provider_name)); } else { $title = pht("Login with %s", $provider_name); $body = hsprintf( @@ -258,7 +258,7 @@ final class PhabricatorLoginController pht( 'You can not use %s to register a new account.', $provider_name)); - $button = pht("Log in with %s", $provider_name); + $button = pht("Log in with %s", phutil_escape_html($provider_name)); } $auth_form = new AphrontFormView(); @@ -299,7 +299,7 @@ final class PhabricatorLoginController return $this->buildApplicationPage( array( $error_view, - phutil_safe_html($login_message), + $login_message, $panel, ), array( diff --git a/src/applications/auth/controller/PhabricatorLoginValidateController.php b/src/applications/auth/controller/PhabricatorLoginValidateController.php index 04b08b43f4..a365618bd8 100644 --- a/src/applications/auth/controller/PhabricatorLoginValidateController.php +++ b/src/applications/auth/controller/PhabricatorLoginValidateController.php @@ -49,18 +49,14 @@ final class PhabricatorLoginValidateController $view = new AphrontRequestFailureView(); $view->setHeader(pht('Login Failed')); - $view->appendChild(hsprintf( - '%s
%s%s
', - pht('Login failed:'), - $list, - pht( - 'Clear your cookies and try again.', - hsprintf('')))); - $view->appendChild(hsprintf( + $view->appendChild( + ''.pht('Login failed:').'
'. + $list. + ''.pht('Clear your cookies and try again.').'
'); + $view->appendChild( ''.pht('Are you sure you want to log out?').'
') ->addSubmitButton(pht('Logout')) ->addCancelButton('/'); diff --git a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php index 67a253b406..b08f7432cc 100644 --- a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php +++ b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php @@ -41,26 +41,31 @@ final class PhabricatorMustVerifyEmailController $error_view = new AphrontRequestFailureView(); $error_view->setHeader(pht('Check Your Email')); - $error_view->appendChild(phutil_tag('p', array(), pht( - 'You must verify your email address to login. You should have a new '. + $error_view->appendChild( + ''. + pht('You must verify your email address to login. You should have a new '. 'email message from Phabricator with verification instructions in your '. - 'inbox (%s).', phutil_tag('strong', array(), $email_address)))); - $error_view->appendChild(phutil_tag('p', array(), pht( - 'If you did not receive an email, you can click the button below '. - 'to try sending another one.'))); - $error_view->appendChild(hsprintf( - '
'. + pht('If you did not receive an email, you can click the button below '. + 'to try sending another one.'). + '
'); + $error_view->appendChild( + 'These tests may be able to '. - 'help diagnose the root cause of problems you experience with %s '. - 'Authentication. Reload the page to run the tests again.
', - $provider->getProviderName())); + 'help diagnose the root cause of problems you experience with '. + $provider->getProviderName() . + ' Authentication. Reload the page to run the tests again.'); $panel_view->appendChild($table_view); return $this->buildStandardPageResponse( diff --git a/src/applications/auth/controller/PhabricatorOAuthLoginController.php b/src/applications/auth/controller/PhabricatorOAuthLoginController.php index a226f5e9cf..dbfcc81810 100644 --- a/src/applications/auth/controller/PhabricatorOAuthLoginController.php +++ b/src/applications/auth/controller/PhabricatorOAuthLoginController.php @@ -116,9 +116,10 @@ final class PhabricatorOAuthLoginController $dialog = new AphrontDialogView(); $dialog->setUser($current_user); $dialog->setTitle(pht('Link %s Account', $provider_name)); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Link your %s account to your Phabricator account?', - $provider_name))); + $dialog->appendChild( + pht( + 'Link your %s account to your Phabricator account?
', + phutil_escape_html($provider_name))); $dialog->addHiddenInput('confirm_token', $provider->getAccessToken()); $dialog->addHiddenInput('expires', $oauth_info->getTokenExpires()); $dialog->addHiddenInput('state', $this->oauthState); diff --git a/src/applications/auth/controller/PhabricatorOAuthUnlinkController.php b/src/applications/auth/controller/PhabricatorOAuthUnlinkController.php index 97be2b7b8c..bff01b251b 100644 --- a/src/applications/auth/controller/PhabricatorOAuthUnlinkController.php +++ b/src/applications/auth/controller/PhabricatorOAuthUnlinkController.php @@ -34,9 +34,9 @@ final class PhabricatorOAuthUnlinkController extends PhabricatorAuthController { $dialog = new AphrontDialogView(); $dialog->setUser($user); $dialog->setTitle(pht('Really unlink account?')); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'You will not be able to login using this account '. - 'once you unlink it. Continue?'))); + $dialog->appendChild( + ''.pht('You will not be able to login using this account '. + 'once you unlink it. Continue?').'
'); $dialog->addSubmitButton(pht('Unlink Account')); $dialog->addCancelButton($provider->getSettingsPanelURI()); diff --git a/src/applications/auth/view/PhabricatorOAuthFailureView.php b/src/applications/auth/view/PhabricatorOAuthFailureView.php index 97b3447b9b..a1e4549745 100644 --- a/src/applications/auth/view/PhabricatorOAuthFailureView.php +++ b/src/applications/auth/view/PhabricatorOAuthFailureView.php @@ -77,12 +77,11 @@ final class PhabricatorOAuthFailureView extends AphrontView { $provider_name); } - $view->appendChild(hsprintf( + $view->appendChild( 'Sun | '. 'Mon | '. @@ -147,10 +141,8 @@ final class AphrontCalendarMonthView extends AphrontView { 'Fri | '. 'Sat | '. '
---|
The task will be put back in the queue and executed '. + 'again.
'); $dialog->addSubmitButton('Retry Task'); } else { $dialog->setTitle('Can Not Retry'); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Only archived, unsuccessful tasks can be retried.'))); + $dialog->appendChild( + 'Only archived, unsuccessful tasks can be retried.
'); } break; case 'cancel': if ($can_cancel) { $dialog->setTitle('Really cancel task?'); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'The work this task represents will never be performed if you '. - 'cancel it. Are you sure you want to cancel it?'))); + $dialog->appendChild( + 'The work this task represents will never be performed if you '. + 'cancel it. Are you sure you want to cancel it?
'); $dialog->addSubmitButton('Cancel Task'); } else { $dialog->setTitle('Can Not Cancel'); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Only active tasks can be cancelled.'))); + $dialog->appendChild( + 'Only active tasks can be cancelled.
'); } break; case 'release': if ($can_release) { $dialog->setTitle('Really free task lease?'); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'If the process which owns the task lease is still doing work '. + $dialog->appendChild( + 'If the process which owns the task lease is still doing work '. 'on it, the work may be performed twice. Are you sure you '. - 'want to free the lease?'))); + 'want to free the lease?
'); $dialog->addSubmitButton('Free Lease'); } else { $dialog->setTitle('Can Not Free Lease'); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Only active, leased tasks may have their leases freed.'))); + $dialog->appendChild( + 'Only active, leased tasks may have their leases freed.
'); } break; default: diff --git a/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php b/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php index 600dc50e14..e3cdc98779 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogEventsView.php @@ -60,7 +60,7 @@ final class PhabricatorDaemonLogEventsView extends AphrontView { } $row = array( - $event->getLogType(), + phutil_escape_html($event->getLogType()), phabricator_date($event->getEpoch(), $this->user), phabricator_time($event->getEpoch(), $this->user), phutil_escape_html_newlines($message.$more), diff --git a/src/applications/daemon/view/PhabricatorDaemonLogListView.php b/src/applications/daemon/view/PhabricatorDaemonLogListView.php index 47353b948f..190e17c3cd 100644 --- a/src/applications/daemon/view/PhabricatorDaemonLogListView.php +++ b/src/applications/daemon/view/PhabricatorDaemonLogListView.php @@ -76,8 +76,8 @@ final class PhabricatorDaemonLogListView extends AphrontView { $rows[] = array( $running, - $log->getDaemon(), - $log->getHost(), + phutil_escape_html($log->getDaemon()), + phutil_escape_html($log->getHost()), $log->getPID(), phabricator_date($epoch, $this->user), phabricator_time($epoch, $this->user), diff --git a/src/applications/differential/controller/DifferentialCommentSaveController.php b/src/applications/differential/controller/DifferentialCommentSaveController.php index 6f84e33282..d49232bb37 100644 --- a/src/applications/differential/controller/DifferentialCommentSaveController.php +++ b/src/applications/differential/controller/DifferentialCommentSaveController.php @@ -60,9 +60,10 @@ final class DifferentialCommentSaveController extends DifferentialController { if (strlen($comment) || $has_inlines) { $dialog->addSubmitButton(pht('Post as Comment')); - $dialog->appendChild(phutil_tag('br')); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Do you want to post your feedback anyway, as a normal comment?'))); + $dialog->appendChild(''.pht('Do you want to post your feedback anyway, as a normal '. + 'comment?').'
'); } return id(new AphrontDialogResponse())->setDialog($dialog); diff --git a/src/applications/differential/controller/DifferentialDiffViewController.php b/src/applications/differential/controller/DifferentialDiffViewController.php index 6503ec2087..afe4847c8c 100644 --- a/src/applications/differential/controller/DifferentialDiffViewController.php +++ b/src/applications/differential/controller/DifferentialDiffViewController.php @@ -25,21 +25,16 @@ final class DifferentialDiffViewController extends DifferentialController { 'href' => PhabricatorEnv::getURI('/D'.$diff->getRevisionID()), ), 'D'.$diff->getRevisionID()); - $top_panel->appendChild(phutil_tag( - 'h1', - array(), - pht('This diff belongs to revision %s', $link))); + $top_panel->appendChild( + "%s
', - pht( - 'Review the diff for correctness. When you are satisfied, either '. - 'create a new revision or update '. - 'an existing revision.', - hsprintf('')))); + $action_panel->appendChild( + ''.pht('Review the diff for '. + 'correctness. When you are satisfied, either create a new '. + 'revision or update an existing revision.')); // TODO: implmenent optgroup support in AphrontFormSelectControl? $select = array(); diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 546a173607..1e572ab334 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -386,15 +386,14 @@ final class DifferentialRevisionViewController extends DifferentialController { $page_pane = id(new DifferentialPrimaryPaneView()) ->setID($pane_id) - ->appendChild(array( - $comment_view->render(), - $diff_history->render(), - $warning, - $local_view->render(), - $toc_view->render(), - $other_view, - $changeset_view->render(), - )); + ->appendChild( + $comment_view->render(). + $diff_history->render(). + $warning. + $local_view->render(). + $toc_view->render(). + $other_view. + $changeset_view->render()); if ($comment_form) { $page_pane->appendChild($comment_form->render()); } @@ -858,12 +857,13 @@ final class DifferentialRevisionViewController extends DifferentialController { $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); - return hsprintf( - '%s
'.$prompt.'
') ->setSubmitURI($request->getRequestURI()) ->addSubmitButton($button) ->addCancelButton('/D'.$revision->getID()); diff --git a/src/applications/differential/field/specification/DifferentialBlameRevisionFieldSpecification.php b/src/applications/differential/field/specification/DifferentialBlameRevisionFieldSpecification.php index a246aa1a31..11f7b5cf19 100644 --- a/src/applications/differential/field/specification/DifferentialBlameRevisionFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialBlameRevisionFieldSpecification.php @@ -49,7 +49,7 @@ final class DifferentialBlameRevisionFieldSpecification return null; } $engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine(); - return $engine->markupText($this->value); + return phutil_safe_html($engine->markupText($this->value)); } public function shouldAppearOnConduitView() { diff --git a/src/applications/differential/field/specification/DifferentialCommitsFieldSpecification.php b/src/applications/differential/field/specification/DifferentialCommitsFieldSpecification.php index b5e6e2a37b..ae8339c05c 100644 --- a/src/applications/differential/field/specification/DifferentialCommitsFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialCommitsFieldSpecification.php @@ -26,7 +26,7 @@ final class DifferentialCommitsFieldSpecification $links[] = $this->getHandle($commit_phid)->renderLink(); } - return phutil_implode_html(phutil_tag('br'), $links); + return array_interleave(phutil_tag('br'), $links); } private function getCommitPHIDs() { diff --git a/src/applications/differential/field/specification/DifferentialDependenciesFieldSpecification.php b/src/applications/differential/field/specification/DifferentialDependenciesFieldSpecification.php index d32047ee22..43f387bb57 100644 --- a/src/applications/differential/field/specification/DifferentialDependenciesFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialDependenciesFieldSpecification.php @@ -26,7 +26,7 @@ final class DifferentialDependenciesFieldSpecification $links[] = $this->getHandle($revision_phids)->renderLink(); } - return phutil_implode_html(phutil_tag('br'), $links); + return array_interleave(phutil_tag('br'), $links); } private function getDependentRevisionPHIDs() { diff --git a/src/applications/differential/field/specification/DifferentialDependsOnFieldSpecification.php b/src/applications/differential/field/specification/DifferentialDependsOnFieldSpecification.php index b195641432..05c8ebef91 100644 --- a/src/applications/differential/field/specification/DifferentialDependsOnFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialDependsOnFieldSpecification.php @@ -26,7 +26,7 @@ final class DifferentialDependsOnFieldSpecification $links[] = $this->getHandle($revision_phids)->renderLink(); } - return phutil_implode_html(phutil_tag('br'), $links); + return array_interleave(phutil_tag('br'), $links); } private function getDependentRevisionPHIDs() { diff --git a/src/applications/differential/field/specification/DifferentialFieldSpecification.php b/src/applications/differential/field/specification/DifferentialFieldSpecification.php index 3521998248..d1b6dbdb3b 100644 --- a/src/applications/differential/field/specification/DifferentialFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialFieldSpecification.php @@ -283,7 +283,7 @@ abstract class DifferentialFieldSpecification { $links[] = $handle->renderLink(); } - return phutil_implode_html(', ', $links); + return array_interleave(', ', $links); } diff --git a/src/applications/differential/field/specification/DifferentialManiphestTasksFieldSpecification.php b/src/applications/differential/field/specification/DifferentialManiphestTasksFieldSpecification.php index 3112f0f379..38379da8f2 100644 --- a/src/applications/differential/field/specification/DifferentialManiphestTasksFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialManiphestTasksFieldSpecification.php @@ -29,7 +29,7 @@ final class DifferentialManiphestTasksFieldSpecification $links[] = $this->getHandle($task_phid)->renderLink(); } - return phutil_implode_html(phutil_tag('br'), $links); + return array_interleave(phutil_tag('br'), $links); } private function getManiphestTaskPHIDs() { diff --git a/src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php b/src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php index de6a89f05a..b519c3e955 100644 --- a/src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php @@ -143,9 +143,10 @@ final class DifferentialReviewersFieldSpecification if ($other_reviewers) { $names = array(); foreach ($other_reviewers as $reviewer => $_) { - $names[] = $this->getHandle($reviewer)->getLinkName(); + $names[] = phutil_escape_html( + $this->getHandle($reviewer)->getLinkName()); } - $suffix = javelin_tag( + $suffix = ' '.javelin_tag( 'abbr', array( 'sigil' => 'has-tooltip', @@ -158,12 +159,9 @@ final class DifferentialReviewersFieldSpecification } else { $suffix = null; } - return hsprintf( - '%s %s', - $this->getHandle($primary_reviewer)->renderLink(), - $suffix); + return $this->getHandle($primary_reviewer)->renderLink().$suffix; } else { - return phutil_tag('em', array(), 'None'); + return 'None'; } } diff --git a/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php b/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php index 6b91e90f43..ae189573ff 100644 --- a/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php @@ -113,7 +113,7 @@ final class DifferentialUnitFieldSpecification $userdata = idx($test, 'userdata'); if ($userdata) { $engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine(); - $userdata = $engine->markupText($userdata); + $userdata = phutil_safe_html($engine->markupText($userdata)); $rows[] = array( 'style' => 'details', 'value' => $userdata, diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php index 479af1b778..7cd5e115f4 100644 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -1092,7 +1092,7 @@ final class DifferentialChangesetParser { * indicator of how well tested a change is. */ public function renderModifiedCoverage() { - $na = phutil_tag('em', array(), '-'); + $na = '-'; $coverage = $this->getCoverage(); if (!$coverage) { diff --git a/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php b/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php index 3c8d90dcfd..3032e15cc1 100644 --- a/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php @@ -21,34 +21,27 @@ abstract class DifferentialChangesetHTMLRenderer return null; } } else { - $none = $none; switch ($change) { case DifferentialChangeType::TYPE_ADD: switch ($file) { case DifferentialChangeType::FILE_TEXT: - $message = pht('This file was added.', $none); + $message = pht('This file was added.'); break; case DifferentialChangeType::FILE_IMAGE: - $message = pht('This image was added.', $none); + $message = pht('This image was added.'); break; case DifferentialChangeType::FILE_DIRECTORY: - $message = pht( - 'This directory was added.', - $none); + $message = pht('This directory was added.'); break; case DifferentialChangeType::FILE_BINARY: - $message = pht( - 'This binary file was added.', - $none); + $message = pht('This binary file was added.'); break; case DifferentialChangeType::FILE_SYMLINK: - $message = pht('This symlink was added.', $none); + $message = pht('This symlink was added.'); break; case DifferentialChangeType::FILE_SUBMODULE: - $message = pht( - 'This submodule was added.', - $none); + $message = pht('This submodule was added.'); break; } break; @@ -56,30 +49,22 @@ abstract class DifferentialChangesetHTMLRenderer case DifferentialChangeType::TYPE_DELETE: switch ($file) { case DifferentialChangeType::FILE_TEXT: - $message = pht('This file was deleted.', $none); + $message = pht('This file was deleted.'); break; case DifferentialChangeType::FILE_IMAGE: - $message = pht('This image was deleted.', $none); + $message = pht('This image was deleted.'); break; case DifferentialChangeType::FILE_DIRECTORY: - $message = pht( - 'This directory was deleted.', - $none); + $message = pht('This directory was deleted.'); break; case DifferentialChangeType::FILE_BINARY: - $message = pht( - 'This binary file was deleted.', - $none); + $message = pht('This binary file was deleted.'); break; case DifferentialChangeType::FILE_SYMLINK: - $message = pht( - 'This symlink was deleted.', - $none); + $message = pht('This symlink was deleted.'); break; case DifferentialChangeType::FILE_SUBMODULE: - $message = pht( - 'This submodule was deleted.', - $none); + $message = pht('This submodule was deleted.'); break; } break; @@ -250,9 +235,10 @@ abstract class DifferentialChangesetHTMLRenderer } } - return hsprintf( - ' ', - $message); + return + ' '; } protected function renderPropertyChangeHeader() { @@ -293,20 +279,15 @@ abstract class DifferentialChangesetHTMLRenderer } } - array_unshift($rows, hsprintf( - ''.pht('Property Changes').' | '. + ''.pht('Old Value').' | '. + ''.pht('New Value').' | '. + '
---|
%s | '. - ''. - ' |
%s | '. + '%s | '. + '
'. - ' | %s | '. - '
'. ' | '. ' | Path | '. - '%s | '. - '%s | '. + ''. + pht('Coverage (All)'). + ' | '. + ''. + pht('Coverage (Touched)'). + ' | '. '
---|
'.pht('You can only release "active" leases.').'
') ->addCancelButton($lease_uri); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -35,10 +35,11 @@ final class DrydockLeaseReleaseController extends DrydockController { $dialog = id(new AphrontDialogView()) ->setUser($user) ->setTitle(pht('Really release lease?')) - ->appendChild(phutil_tag('p', array(), pht( - 'Releasing a lease may cause trouble for the lease holder and '. - 'trigger cleanup of the underlying resource. It can not be '. - 'undone. Continue?'))) + ->appendChild( + ''.pht( + 'Releasing a lease may cause trouble for the lease holder and '. + 'trigger cleanup of the underlying resource. It can not be '. + 'undone. Continue?').'
') ->addSubmitButton(pht('Release Lease')) ->addCancelButton($lease_uri); diff --git a/src/applications/drydock/controller/DrydockResourceCloseController.php b/src/applications/drydock/controller/DrydockResourceCloseController.php index 8b28ce0319..94ac736b78 100644 --- a/src/applications/drydock/controller/DrydockResourceCloseController.php +++ b/src/applications/drydock/controller/DrydockResourceCloseController.php @@ -24,8 +24,8 @@ final class DrydockResourceCloseController extends DrydockController { $dialog = id(new AphrontDialogView()) ->setUser($user) ->setTitle(pht('Resource Not Open')) - ->appendChild(phutil_tag('p', array(), pht( - 'You can only close "open" resources.'))) + ->appendChild( + ''.pht('You can only close "open" resources.').'
') ->addCancelButton($resource_uri); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -35,9 +35,10 @@ final class DrydockResourceCloseController extends DrydockController { $dialog = id(new AphrontDialogView()) ->setUser($user) ->setTitle(pht('Really close resource?')) - ->appendChild(phutil_tag('p', array(), pht( - 'Closing a resource releases all leases and destroys the '. - 'resource. It can not be undone. Continue?'))) + ->appendChild( + ''.pht( + 'Closing a resource releases all leases and destroys the '. + 'resource. It can not be undone. Continue?').'
') ->addSubmitButton(pht('Close Resource')) ->addCancelButton($resource_uri); diff --git a/src/applications/fact/controller/PhabricatorFactHomeController.php b/src/applications/fact/controller/PhabricatorFactHomeController.php index 342edb7fa3..82ce96baa1 100644 --- a/src/applications/fact/controller/PhabricatorFactHomeController.php +++ b/src/applications/fact/controller/PhabricatorFactHomeController.php @@ -32,7 +32,10 @@ final class PhabricatorFactHomeController extends PhabricatorFactController { $name = $spec->getName(); $value = $spec->formatValueForDisplay($user, $fact->getValueX()); - $rows[] = array($name, $value); + $rows[] = array( + phutil_escape_html($name), + phutil_escape_html($value), + ); } $table = new AphrontTableView($rows); diff --git a/src/applications/feed/builder/PhabricatorFeedBuilder.php b/src/applications/feed/builder/PhabricatorFeedBuilder.php index 9803fd51e1..dfb9751cf8 100644 --- a/src/applications/feed/builder/PhabricatorFeedBuilder.php +++ b/src/applications/feed/builder/PhabricatorFeedBuilder.php @@ -40,8 +40,8 @@ final class PhabricatorFeedBuilder { if ($date !== $last_date) { if ($last_date !== null) { - $null_view->appendChild(hsprintf( - '')); + $null_view->appendChild( + ''); } $last_date = $date; $null_view->appendChild( @@ -59,9 +59,10 @@ final class PhabricatorFeedBuilder { $null_view->appendChild($view); } - return id(new AphrontNullView())->appendChild(hsprintf( - ''.pht('Really disable the much-beloved image macro %s? '. + 'It will be sorely missed.', phutil_escape_html($macro->getName())). + '
') ->setSubmitURI($this->getApplicationURI('/disable/'.$this->id.'/')) ->addSubmitButton(pht('Disable')) ->addCancelButton($view_uri); diff --git a/src/applications/macro/controller/PhabricatorMacroViewController.php b/src/applications/macro/controller/PhabricatorMacroViewController.php index 94e0c4691f..770ae16a1c 100644 --- a/src/applications/macro/controller/PhabricatorMacroViewController.php +++ b/src/applications/macro/controller/PhabricatorMacroViewController.php @@ -147,7 +147,7 @@ final class PhabricatorMacroViewController foreach ($subscribers as $subscriber) { $sub_view[] = $this->getHandle($subscriber)->renderLink(); } - $sub_view = phutil_implode_html(', ', $sub_view); + $sub_view = array_interleave(', ', $sub_view); } else { $sub_view = phutil_tag('em', array(), pht('None')); } diff --git a/src/applications/macro/storage/PhabricatorMacroTransaction.php b/src/applications/macro/storage/PhabricatorMacroTransaction.php index bd0ac70c49..5711d7899e 100644 --- a/src/applications/macro/storage/PhabricatorMacroTransaction.php +++ b/src/applications/macro/storage/PhabricatorMacroTransaction.php @@ -64,8 +64,8 @@ final class PhabricatorMacroTransaction return pht( '%s renamed this macro from "%s" to "%s".', $this->renderHandleLink($author_phid), - $old, - $new); + phutil_escape_html($old), + phutil_escape_html($new)); break; case PhabricatorMacroTransactionType::TYPE_DISABLED: if ($new) { @@ -109,8 +109,8 @@ final class PhabricatorMacroTransaction '%s renamed %s from "%s" to "%s".', $this->renderHandleLink($author_phid), $this->renderHandleLink($object_phid), - $old, - $new); + phutil_escape_html($old), + phutil_escape_html($new)); case PhabricatorMacroTransactionType::TYPE_DISABLED: if ($new) { return pht( diff --git a/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php b/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php index f5670b4895..c675d4b30b 100644 --- a/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php +++ b/src/applications/mailinglists/controller/PhabricatorMailingListsListController.php @@ -31,8 +31,8 @@ final class PhabricatorMailingListsListController $rows = array(); foreach ($lists as $list) { $rows[] = array( - $list->getName(), - $list->getEmail(), + phutil_escape_html($list->getName()), + phutil_escape_html($list->getEmail()), phutil_tag( 'a', array( diff --git a/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldDefaultSpecification.php b/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldDefaultSpecification.php index 15058a7302..b393a6e1de 100644 --- a/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldDefaultSpecification.php +++ b/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldDefaultSpecification.php @@ -152,13 +152,13 @@ class ManiphestAuxiliaryFieldDefaultSpecification switch ($this->getFieldType()) { case self::TYPE_BOOL: if ($this->getValue()) { - return $this->getCheckboxValue(); + return phutil_escape_html($this->getCheckboxValue()); } else { return null; } case self::TYPE_SELECT: $display = idx($this->getSelectOptions(), $this->getValue()); - return $display; + return phutil_escape_html($display); } return parent::renderForDetailView(); } @@ -203,6 +203,10 @@ class ManiphestAuxiliaryFieldDefaultSpecification break; } + if ($target == self::RENDER_TARGET_HTML) { + $desc = phutil_escape_html($desc); + } + return $desc; } diff --git a/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldSpecification.php b/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldSpecification.php index 216227194d..fba027e838 100644 --- a/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldSpecification.php +++ b/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldSpecification.php @@ -71,7 +71,7 @@ abstract class ManiphestAuxiliaryFieldSpecification { } public function renderForDetailView() { - return $this->getValue(); + return phutil_escape_html($this->getValue()); } diff --git a/src/applications/maniphest/controller/ManiphestExportController.php b/src/applications/maniphest/controller/ManiphestExportController.php index a33809b745..591e8ff310 100644 --- a/src/applications/maniphest/controller/ManiphestExportController.php +++ b/src/applications/maniphest/controller/ManiphestExportController.php @@ -28,7 +28,7 @@ final class ManiphestExportController extends ManiphestController { $dialog->setUser($user); $dialog->setTitle('Excel Export Not Configured'); - $dialog->appendChild(hsprintf( + $dialog->appendChild( 'This system does not have PHPExcel installed. This software '. 'component is required to export tasks to Excel. Have your system '. 'administrator install it from:
'. @@ -38,7 +38,7 @@ final class ManiphestExportController extends ManiphestController { ''. 'Your PHP "include_path" needs to be updated to include the '. - 'PHPExcel Classes/ directory.
')); + 'PHPExcel Classes/ directory.'); $dialog->addCancelButton('/maniphest/'); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -59,8 +59,8 @@ final class ManiphestExportController extends ManiphestController { $dialog->setUser($user); $dialog->setTitle('Export Tasks to Excel'); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Do you want to export the query results to Excel?'))); + $dialog->appendChild( + 'Do you want to export the query results to Excel?
'); $dialog->addCancelButton('/maniphest/'); $dialog->addSubmitButton('Export to Excel'); diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index 229ba2e1f4..34c2b30494 100644 --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -244,7 +244,7 @@ final class ManiphestReportController extends ManiphestController { )); if ($handle) { - $header = pht("Task Burn Rate for Project %s", $handle->renderLink()); + $header = "Task Burn Rate for Project ".$handle->renderLink(); $caption = hsprintf( "NOTE: This table reflects tasks currently in ". "the project. If a task was opened in the past but added to ". @@ -363,9 +363,9 @@ final class ManiphestReportController extends ManiphestController { $fmt = number_format($delta); if ($delta > 0) { $fmt = '+'.$fmt; - $fmt = hsprintf('%s', $fmt); + $fmt = ''.$fmt.''; } else { - $fmt = hsprintf('%s', $fmt); + $fmt = ''.$fmt.''; } return array( diff --git a/src/applications/maniphest/controller/ManiphestSavedQueryListController.php b/src/applications/maniphest/controller/ManiphestSavedQueryListController.php index 2f80e6028d..d6377c10b7 100644 --- a/src/applications/maniphest/controller/ManiphestSavedQueryListController.php +++ b/src/applications/maniphest/controller/ManiphestSavedQueryListController.php @@ -81,7 +81,7 @@ final class ManiphestSavedQueryListController extends ManiphestController { 'value' => 0, 'checked' => ($default === null ? 'checked' : null), )), - phutil_tag('em', array(), 'No Default'), + 'No Default', '', '', ); @@ -111,7 +111,7 @@ final class ManiphestSavedQueryListController extends ManiphestController { 'Save Default Query')); $panel->appendChild($table); - $form = phabricator_form( + $form = phabricator_render_form( $user, array( 'method' => 'POST', diff --git a/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php b/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php index ee185362c5..64fa264dc8 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php @@ -18,9 +18,10 @@ final class ManiphestTaskDescriptionPreviewController ManiphestTask::MARKUP_FIELD_DESCRIPTION, $request->getUser()); - $content = hsprintf( - '
%s%s | '. - '%s | '. - '0 Selected Tasks | '. - '%s | '. + ''. + $select_all. + $select_none. + ' | '. + ''. + $export. + ' | '. + ''. + '0 Selected Tasks'. + ' | '. + ''.$submit.' | '. '
Are you sure you want to delete this client?
' + ); $dialog->addSubmitButton(); $dialog->addCancelButton($client->getEditURI()); return id(new AphrontDialogResponse())->setDialog($dialog); diff --git a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php index b8d6d65907..51104ae880 100644 --- a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php +++ b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php @@ -113,8 +113,10 @@ extends PhabricatorOAuthClientBaseController { $new = $this->getRequest()->getStr('new'); $deleted = $this->getRequest()->getBool('deleted'); if ($edited) { + $edited = phutil_escape_html($edited); $title = 'Successfully edited client with id '.$edited.'.'; } else if ($new) { + $new = phutil_escape_html($new); $title = 'Successfully created client with id '.$new.'.'; } else if ($deleted) { $title = 'Successfully deleted client.'; diff --git a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationDeleteController.php b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationDeleteController.php index 4f366c53d9..94c9839d79 100644 --- a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationDeleteController.php +++ b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationDeleteController.php @@ -37,17 +37,20 @@ extends PhabricatorOAuthClientAuthorizationBaseController { ->loadOneWhere('phid = %s', $client_phid); if ($client) { - $title .= ' for '.$client->getName(); + $client_name = phutil_escape_html($client->getName()); + $title .= ' for '.$client_name; } else { // the client does not exist so token is dead already (but // let's let the user clean this up anyway in that case) + $client_name = ''; } $dialog = new AphrontDialogView(); $dialog->setUser($current_user); $dialog->setTitle($title); - $dialog->appendChild(phutil_tag('p', array(), pht( - 'Are you sure you want to delete this client authorization?'))); + $dialog->appendChild( + 'Are you sure you want to delete this client authorization?
' + ); $dialog->addSubmitButton(); $dialog->addCancelButton($authorization->getEditURI()); return id(new AphrontDialogResponse())->setDialog($dialog); diff --git a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php index d45e4dc96d..c3b0a927af 100644 --- a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php +++ b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php @@ -137,6 +137,7 @@ extends PhabricatorOAuthClientAuthorizationBaseController { $edited = $this->getRequest()->getStr('edited'); $deleted = $this->getRequest()->getBool('deleted'); if ($edited) { + $edited = phutil_escape_html($edited); $title = 'Successfully edited client authorization.'; } else if ($deleted) { $title = 'Successfully deleted client authorization.'; diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php index eae6ac2050..58afadf36d 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -47,25 +47,32 @@ final class PhabricatorOwnersDetailController $rows = array(); - $rows[] = array('Name', $package->getName()); - $rows[] = array('Description', $package->getDescription()); + $rows[] = array( + 'Name', + phutil_escape_html($package->getName())); + $rows[] = array( + 'Description', + phutil_escape_html($package->getDescription())); $primary_owner = null; $primary_phid = $package->getPrimaryOwnerPHID(); if ($primary_phid && isset($handles[$primary_phid])) { - $primary_owner = phutil_tag( - 'strong', - array(), - $handles[$primary_phid]->renderLink()); + $primary_owner = + ''.$handles[$primary_phid]->renderLink().''; } - $rows[] = array('Primary Owner', $primary_owner); + $rows[] = array( + 'Primary Owner', + $primary_owner, + ); $owner_links = array(); foreach ($owners as $owner) { $owner_links[] = $handles[$owner->getUserPHID()]->renderLink(); } - $owner_links = phutil_implode_html(phutil_tag('br'), $owner_links); - $rows[] = array('Owners', $owner_links); + $owner_links = implode(''.pht('You can not view the live version of this post because it '. 'is not associated with a blog. Move the post to a blog in order to '. - 'view it live.')); + 'view it live.').'
'; } if ($post->isDraft()) { - $reasons[] = phutil_tag('p', array(), pht( - 'You can not view the live version of this post because it '. - 'is still a draft. Use "Preview/Publish" to publish the post.')); + $reasons[] = + ''.pht('You can not view the live version of this post because it '. + 'is still a draft. Use "Preview/Publish" to publish the post.').'
'; } if ($reasons) { diff --git a/src/applications/phame/controller/post/PhamePostPreviewController.php b/src/applications/phame/controller/post/PhamePostPreviewController.php index 06fe3de4da..38b007178d 100644 --- a/src/applications/phame/controller/post/PhamePostPreviewController.php +++ b/src/applications/phame/controller/post/PhamePostPreviewController.php @@ -23,7 +23,7 @@ extends PhameController { PhamePost::MARKUP_FIELD_BODY, $user); - $content = hsprintf('