diff --git a/src/aphront/AphrontRequest.php b/src/aphront/AphrontRequest.php index 1d940c32d1..42c80f5f6f 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_render_form(), JX.Request, + // certain requests (e.g., by phabricator_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 1981ee4428..44de55a4d3 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(phutil_escape_html($ex->getTitle())); + $error->setTitle($ex->getTitle()); $error->appendChild($ex->getMessage()); $view = new PhabricatorStandardPageView(); @@ -227,8 +227,8 @@ class AphrontDefaultApplicationConfiguration // Always log the unhandled exception. phlog($ex); - $class = phutil_escape_html(get_class($ex)); - $message = phutil_escape_html($ex->getMessage()); + $class = get_class($ex); + $message = $ex->getMessage(); if ($ex instanceof AphrontQuerySchemaException) { $message .= @@ -244,11 +244,13 @@ class AphrontDefaultApplicationConfiguration $trace = null; } - $content = + $content = hsprintf( '
'. - $details.''. - '
%s'. + '
'.$forbidden_text.'
'); + $failure->appendChild(phutil_tag('p', array(), $forbidden_text)); $view = new PhabricatorStandardPageView(); $view->setTitle('403 Forbidden'); diff --git a/src/aphront/response/Aphront404Response.php b/src/aphront/response/Aphront404Response.php index 2821012fc4..fbfa41a0da 100644 --- a/src/aphront/response/Aphront404Response.php +++ b/src/aphront/response/Aphront404Response.php @@ -12,7 +12,8 @@ final class Aphront404Response extends AphrontHTMLResponse { public function buildResponseString() { $failure = new AphrontRequestFailureView(); $failure->setHeader('404 Not Found'); - $failure->appendChild('The page you requested was not found.
'); + $failure->appendChild(phutil_tag('p', array(), pht( + '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 4083b1be88..9bc2a54e83 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 $this->content; + return hsprintf('%s', $this->content); } } diff --git a/src/applications/audit/controller/PhabricatorAuditListController.php b/src/applications/audit/controller/PhabricatorAuditListController.php index d858dec6bf..d776fe12fd 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 = phutil_escape_html($handle->getName()); + $handle_name = $handle->getName(); } else { $handle_name = null; } @@ -435,7 +435,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { } if ($handle) { - $handle_name = phutil_escape_html($handle->getName()); + $handle_name = $handle->getName(); } else { $handle_name = null; } diff --git a/src/applications/audit/view/PhabricatorAuditCommitListView.php b/src/applications/audit/view/PhabricatorAuditCommitListView.php index 6987fa117e..dc674cec8b 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, - phutil_escape_html($commit->getCommitData()->getSummary()), + $commit->getCommitData()->getSummary(), PhabricatorAuditCommitStatusConstants::getStatusName( $commit->getAuditStatus()), - implode(', ', $auditors), + phutil_implode_html(', ', $auditors), phabricator_datetime($commit->getEpoch(), $this->user), ); } diff --git a/src/applications/audit/view/PhabricatorAuditListView.php b/src/applications/audit/view/PhabricatorAuditListView.php index 2bac041aa1..5a7ef11a1f 100644 --- a/src/applications/audit/view/PhabricatorAuditListView.php +++ b/src/applications/audit/view/PhabricatorAuditListView.php @@ -129,10 +129,7 @@ final class PhabricatorAuditListView extends AphrontView { } $reasons = $audit->getAuditReasons(); - foreach ($reasons as $key => $reason) { - $reasons[$key] = phutil_escape_html($reason); - } - $reasons = implode(''.pht('Your account has been disabled.').'
'); + $failure_view->appendChild(phutil_tag('p', array(), 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 e6cc6372df..3875de3c62 100644 --- a/src/applications/auth/controller/PhabricatorEmailLoginController.php +++ b/src/applications/auth/controller/PhabricatorEmailLoginController.php @@ -98,10 +98,8 @@ EOBODY; $view = new AphrontRequestFailureView(); $view->setHeader(pht('Check Your Email')); - $view->appendChild( - ''.pht( - 'An email has been sent with a link you can use to login.' - ).'
'); + $view->appendChild(phutil_tag('p', array(), pht( + 'An email has been sent with a link you can use to login.'))); return $this->buildStandardPageResponse( $view, array( @@ -140,8 +138,8 @@ EOBODY; $panel = new AphrontPanelView(); $panel->setWidth(AphrontPanelView::WIDTH_FORM); - $panel->appendChild(' -'.pht('The authentication information in the link you clicked is '. + $view->appendChild(phutil_tag('p', array(), 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( + 'a new email.'))); + $view->appendChild(hsprintf( ''.pht('The LDAP account you just authorized is already '. + $dialog->appendChild(phutil_tag('p', array(), 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); @@ -62,10 +61,8 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController { $dialog = new AphrontDialogView(); $dialog->setUser($current_user); $dialog->setTitle(pht('Link LDAP Account')); - $dialog->appendChild( - ''. - pht('Link your LDAP account to your Phabricator account?'). - '
'); + $dialog->appendChild(phutil_tag('p', array(), 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')); @@ -134,9 +131,10 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController { $panel = new AphrontPanelView(); $panel->setWidth(AphrontPanelView::WIDTH_FORM); - $panel->appendChild(''.pht('You will not be able to login using this account '. - 'once you unlink it. Continue?').'
'); + $dialog->appendChild(phutil_tag('p', array(), 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 23de5e7f2d..f4bb0ab57a 100644 --- a/src/applications/auth/controller/PhabricatorLoginController.php +++ b/src/applications/auth/controller/PhabricatorLoginController.php @@ -29,7 +29,8 @@ final class PhabricatorLoginController $dialog = new AphrontDialogView(); $dialog->setUser($user); $dialog->setTitle(pht('Login Required')); - $dialog->appendChild(''.pht('You must login to continue.').'
'); + $dialog->appendChild(phutil_tag('p', array(), pht( + 'You must login to continue.'))); $dialog->addSubmitButton(pht('Login')); $dialog->addCancelButton('/', pht('Cancel')); @@ -246,8 +247,7 @@ 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", - phutil_escape_html($provider_name)); + $button = pht("Login or Register with %s", $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", phutil_escape_html($provider_name)); + $button = pht("Log in with %s", $provider_name); } $auth_form = new AphrontFormView(); @@ -299,7 +299,7 @@ final class PhabricatorLoginController return $this->buildApplicationPage( array( $error_view, - $login_message, + phutil_safe_html($login_message), $panel, ), array( diff --git a/src/applications/auth/controller/PhabricatorLoginValidateController.php b/src/applications/auth/controller/PhabricatorLoginValidateController.php index a365618bd8..04b08b43f4 100644 --- a/src/applications/auth/controller/PhabricatorLoginValidateController.php +++ b/src/applications/auth/controller/PhabricatorLoginValidateController.php @@ -49,14 +49,18 @@ final class PhabricatorLoginValidateController $view = new AphrontRequestFailureView(); $view->setHeader(pht('Login Failed')); - $view->appendChild( - ''.pht('Login failed:').'
'. - $list. - ''.pht('Clear your cookies and try again.').'
'); - $view->appendChild( + $view->appendChild(hsprintf( + '%s
%s%s
', + pht('Login failed:'), + $list, + pht( + 'Clear your cookies and try again.', + hsprintf('')))); + $view->appendChild(hsprintf( ''.pht('Are you sure you want to log out?').'
') + ->appendChild(phutil_tag('p', array(), 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 b08f7432cc..67a253b406 100644 --- a/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php +++ b/src/applications/auth/controller/PhabricatorMustVerifyEmailController.php @@ -41,31 +41,26 @@ final class PhabricatorMustVerifyEmailController $error_view = new AphrontRequestFailureView(); $error_view->setHeader(pht('Check Your Email')); - $error_view->appendChild( - ''. - pht('You must verify your email address to login. You should have a new '. + $error_view->appendChild(phutil_tag('p', array(), 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( - ''. - 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 '. - $provider->getProviderName() . - ' Authentication. Reload the page to run the tests again.
'); + 'help diagnose the root cause of problems you experience with %s '. + 'Authentication. Reload the page to run the tests again.', + $provider->getProviderName())); $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 dbfcc81810..a226f5e9cf 100644 --- a/src/applications/auth/controller/PhabricatorOAuthLoginController.php +++ b/src/applications/auth/controller/PhabricatorOAuthLoginController.php @@ -116,10 +116,9 @@ final class PhabricatorOAuthLoginController $dialog = new AphrontDialogView(); $dialog->setUser($current_user); $dialog->setTitle(pht('Link %s Account', $provider_name)); - $dialog->appendChild( - pht( - 'Link your %s account to your Phabricator account?
', - phutil_escape_html($provider_name))); + $dialog->appendChild(phutil_tag('p', array(), pht( + 'Link your %s account to your Phabricator account?', + $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 bff01b251b..97be2b7b8c 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( - ''.pht('You will not be able to login using this account '. - 'once you unlink it. Continue?').'
'); + $dialog->appendChild(phutil_tag('p', array(), 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 a1e4549745..97b3447b9b 100644 --- a/src/applications/auth/view/PhabricatorOAuthFailureView.php +++ b/src/applications/auth/view/PhabricatorOAuthFailureView.php @@ -77,11 +77,12 @@ final class PhabricatorOAuthFailureView extends AphrontView { $provider_name); } - $view->appendChild( + $view->appendChild(hsprintf( '| Sun | '. 'Mon | '. @@ -141,8 +147,10 @@ final class AphrontCalendarMonthView extends AphrontView { 'Fri | '. 'Sat | '. '
|---|
The task will be put back in the queue and executed '. - 'again.
'); + $dialog->appendChild(phutil_tag('p', array(), pht( + 'The task will be put back in the queue and executed again.'))); $dialog->addSubmitButton('Retry Task'); } else { $dialog->setTitle('Can Not Retry'); - $dialog->appendChild( - 'Only archived, unsuccessful tasks can be retried.
'); + $dialog->appendChild(phutil_tag('p', array(), pht( + 'Only archived, unsuccessful tasks can be retried.'))); } break; case 'cancel': if ($can_cancel) { $dialog->setTitle('Really cancel task?'); - $dialog->appendChild( - 'The work this task represents will never be performed if you '. - 'cancel it. Are you sure you want to cancel it?
'); + $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->addSubmitButton('Cancel Task'); } else { $dialog->setTitle('Can Not Cancel'); - $dialog->appendChild( - 'Only active tasks can be cancelled.
'); + $dialog->appendChild(phutil_tag('p', array(), pht( + 'Only active tasks can be cancelled.'))); } break; case 'release': if ($can_release) { $dialog->setTitle('Really free task lease?'); - $dialog->appendChild( - 'If the process which owns the task lease is still doing work '. + $dialog->appendChild(phutil_tag('p', array(), pht( + '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( - 'Only active, leased tasks may have their leases freed.
'); + $dialog->appendChild(phutil_tag('p', array(), pht( + '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 e3cdc98779..600dc50e14 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( - phutil_escape_html($event->getLogType()), + $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 190e17c3cd..47353b948f 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, - phutil_escape_html($log->getDaemon()), - phutil_escape_html($log->getHost()), + $log->getDaemon(), + $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 d49232bb37..6f84e33282 100644 --- a/src/applications/differential/controller/DifferentialCommentSaveController.php +++ b/src/applications/differential/controller/DifferentialCommentSaveController.php @@ -60,10 +60,9 @@ final class DifferentialCommentSaveController extends DifferentialController { if (strlen($comment) || $has_inlines) { $dialog->addSubmitButton(pht('Post as Comment')); - $dialog->appendChild(''.pht('Do you want to post your feedback anyway, as a normal '. - '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?'))); } return id(new AphrontDialogResponse())->setDialog($dialog); diff --git a/src/applications/differential/controller/DifferentialDiffViewController.php b/src/applications/differential/controller/DifferentialDiffViewController.php index afe4847c8c..6503ec2087 100644 --- a/src/applications/differential/controller/DifferentialDiffViewController.php +++ b/src/applications/differential/controller/DifferentialDiffViewController.php @@ -25,16 +25,21 @@ final class DifferentialDiffViewController extends DifferentialController { 'href' => PhabricatorEnv::getURI('/D'.$diff->getRevisionID()), ), 'D'.$diff->getRevisionID()); - $top_panel->appendChild( - "'.pht('Review the diff for '. - 'correctness. When you are satisfied, either create a new '. - 'revision or update an existing revision.')); + $action_panel->appendChild(hsprintf( + '
%s
', + pht( + 'Review the diff for correctness. When you are satisfied, either '. + 'create a new revision or update '. + 'an existing revision.', + hsprintf('')))); // 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 1e572ab334..546a173607 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -386,14 +386,15 @@ final class DifferentialRevisionViewController extends DifferentialController { $page_pane = id(new DifferentialPrimaryPaneView()) ->setID($pane_id) - ->appendChild( - $comment_view->render(). - $diff_history->render(). - $warning. - $local_view->render(). - $toc_view->render(). - $other_view. - $changeset_view->render()); + ->appendChild(array( + $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()); } @@ -857,13 +858,12 @@ final class DifferentialRevisionViewController extends DifferentialController { $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); - return + return hsprintf( + '%s'.$prompt.'
') + ->appendChild(phutil_tag('p', array(), $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 11f7b5cf19..a246aa1a31 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 phutil_safe_html($engine->markupText($this->value)); + return $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 ae8339c05c..b5e6e2a37b 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 array_interleave(phutil_tag('br'), $links); + return phutil_implode_html(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 43f387bb57..d32047ee22 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 array_interleave(phutil_tag('br'), $links); + return phutil_implode_html(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 05c8ebef91..b195641432 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 array_interleave(phutil_tag('br'), $links); + return phutil_implode_html(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 d1b6dbdb3b..3521998248 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 array_interleave(', ', $links); + return phutil_implode_html(', ', $links); } diff --git a/src/applications/differential/field/specification/DifferentialManiphestTasksFieldSpecification.php b/src/applications/differential/field/specification/DifferentialManiphestTasksFieldSpecification.php index 38379da8f2..3112f0f379 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 array_interleave(phutil_tag('br'), $links); + return phutil_implode_html(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 b519c3e955..de6a89f05a 100644 --- a/src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php +++ b/src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php @@ -143,10 +143,9 @@ final class DifferentialReviewersFieldSpecification if ($other_reviewers) { $names = array(); foreach ($other_reviewers as $reviewer => $_) { - $names[] = phutil_escape_html( - $this->getHandle($reviewer)->getLinkName()); + $names[] = $this->getHandle($reviewer)->getLinkName(); } - $suffix = ' '.javelin_tag( + $suffix = javelin_tag( 'abbr', array( 'sigil' => 'has-tooltip', @@ -159,9 +158,12 @@ final class DifferentialReviewersFieldSpecification } else { $suffix = null; } - return $this->getHandle($primary_reviewer)->renderLink().$suffix; + return hsprintf( + '%s %s', + $this->getHandle($primary_reviewer)->renderLink(), + $suffix); } else { - return 'None'; + return phutil_tag('em', array(), 'None'); } } diff --git a/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php b/src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php index ae189573ff..6b91e90f43 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 = phutil_safe_html($engine->markupText($userdata)); + $userdata = $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 7cd5e115f4..479af1b778 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 = '-'; + $na = phutil_tag('em', array(), '-'); $coverage = $this->getCoverage(); if (!$coverage) { diff --git a/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php b/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php index 3032e15cc1..3c8d90dcfd 100644 --- a/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php +++ b/src/applications/differential/render/DifferentialChangesetHTMLRenderer.php @@ -21,27 +21,34 @@ 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.'); + $message = pht('This file was added.', $none); break; case DifferentialChangeType::FILE_IMAGE: - $message = pht('This image was added.'); + $message = pht('This image was added.', $none); break; case DifferentialChangeType::FILE_DIRECTORY: - $message = pht('This directory was added.'); + $message = pht( + 'This directory was added.', + $none); break; case DifferentialChangeType::FILE_BINARY: - $message = pht('This binary file was added.'); + $message = pht( + 'This binary file was added.', + $none); break; case DifferentialChangeType::FILE_SYMLINK: - $message = pht('This symlink was added.'); + $message = pht('This symlink was added.', $none); break; case DifferentialChangeType::FILE_SUBMODULE: - $message = pht('This submodule was added.'); + $message = pht( + 'This submodule was added.', + $none); break; } break; @@ -49,22 +56,30 @@ abstract class DifferentialChangesetHTMLRenderer case DifferentialChangeType::TYPE_DELETE: switch ($file) { case DifferentialChangeType::FILE_TEXT: - $message = pht('This file was deleted.'); + $message = pht('This file was deleted.', $none); break; case DifferentialChangeType::FILE_IMAGE: - $message = pht('This image was deleted.'); + $message = pht('This image was deleted.', $none); break; case DifferentialChangeType::FILE_DIRECTORY: - $message = pht('This directory was deleted.'); + $message = pht( + 'This directory was deleted.', + $none); break; case DifferentialChangeType::FILE_BINARY: - $message = pht('This binary file was deleted.'); + $message = pht( + 'This binary file was deleted.', + $none); break; case DifferentialChangeType::FILE_SYMLINK: - $message = pht('This symlink was deleted.'); + $message = pht( + 'This symlink was deleted.', + $none); break; case DifferentialChangeType::FILE_SUBMODULE: - $message = pht('This submodule was deleted.'); + $message = pht( + 'This submodule was deleted.', + $none); break; } break; @@ -235,10 +250,9 @@ abstract class DifferentialChangesetHTMLRenderer } } - return - ''; + return hsprintf( + '', + $message); } protected function renderPropertyChangeHeader() { @@ -279,15 +293,20 @@ abstract class DifferentialChangesetHTMLRenderer } } - return - '| '.pht('Property Changes').' | '. - ''.pht('Old Value').' | '. - ''.pht('New Value').' | '. - '
|---|
| %s | '. - '%s | '. - '||||
| %s | '. + ''. + ' | ||||
| '. + ' | %s | '. + '||||
| '. ' | '. ' | Path | '. - ''. - pht('Coverage (All)'). - ' | '. - ''. - pht('Coverage (Touched)'). - ' | '. + '%s | '. + '%s | '. '
|---|
'.pht('You can only release "active" leases.').'
') + ->appendChild(phutil_tag('p', array(), pht( + 'You can only release "active" leases.'))) ->addCancelButton($lease_uri); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -35,11 +35,10 @@ final class DrydockLeaseReleaseController extends DrydockController { $dialog = id(new AphrontDialogView()) ->setUser($user) ->setTitle(pht('Really release lease?')) - ->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?').'
') + ->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?'))) ->addSubmitButton(pht('Release Lease')) ->addCancelButton($lease_uri); diff --git a/src/applications/drydock/controller/DrydockResourceCloseController.php b/src/applications/drydock/controller/DrydockResourceCloseController.php index 94ac736b78..8b28ce0319 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( - ''.pht('You can only close "open" resources.').'
') + ->appendChild(phutil_tag('p', array(), pht( + 'You can only close "open" resources.'))) ->addCancelButton($resource_uri); return id(new AphrontDialogResponse())->setDialog($dialog); @@ -35,10 +35,9 @@ final class DrydockResourceCloseController extends DrydockController { $dialog = id(new AphrontDialogView()) ->setUser($user) ->setTitle(pht('Really close resource?')) - ->appendChild( - ''.pht( - 'Closing a resource releases all leases and destroys the '. - 'resource. It can not be undone. Continue?').'
') + ->appendChild(phutil_tag('p', array(), 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 82ce96baa1..342edb7fa3 100644 --- a/src/applications/fact/controller/PhabricatorFactHomeController.php +++ b/src/applications/fact/controller/PhabricatorFactHomeController.php @@ -32,10 +32,7 @@ final class PhabricatorFactHomeController extends PhabricatorFactController { $name = $spec->getName(); $value = $spec->formatValueForDisplay($user, $fact->getValueX()); - $rows[] = array( - phutil_escape_html($name), - phutil_escape_html($value), - ); + $rows[] = array($name, $value); } $table = new AphrontTableView($rows); diff --git a/src/applications/feed/builder/PhabricatorFeedBuilder.php b/src/applications/feed/builder/PhabricatorFeedBuilder.php index dfb9751cf8..9803fd51e1 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( - ''); + $null_view->appendChild(hsprintf( + '')); } $last_date = $date; $null_view->appendChild( @@ -59,10 +59,9 @@ final class PhabricatorFeedBuilder { $null_view->appendChild($view); } - return id(new AphrontNullView())->appendChild( - ''.pht('Really disable the much-beloved image macro %s? '. - 'It will be sorely missed.', phutil_escape_html($macro->getName())). - '
') + ->appendChild(phutil_tag('p', array(), pht( + 'Really disable the much-beloved image macro %s? '. + 'It will be sorely missed.', + $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 770ae16a1c..94e0c4691f 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 = array_interleave(', ', $sub_view); + $sub_view = phutil_implode_html(', ', $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 5711d7899e..bd0ac70c49 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), - phutil_escape_html($old), - phutil_escape_html($new)); + $old, + $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), - phutil_escape_html($old), - phutil_escape_html($new)); + $old, + $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 c675d4b30b..f5670b4895 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( - phutil_escape_html($list->getName()), - phutil_escape_html($list->getEmail()), + $list->getName(), + $list->getEmail(), phutil_tag( 'a', array( diff --git a/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldDefaultSpecification.php b/src/applications/maniphest/auxiliaryfield/ManiphestAuxiliaryFieldDefaultSpecification.php index b393a6e1de..15058a7302 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 phutil_escape_html($this->getCheckboxValue()); + return $this->getCheckboxValue(); } else { return null; } case self::TYPE_SELECT: $display = idx($this->getSelectOptions(), $this->getValue()); - return phutil_escape_html($display); + return $display; } return parent::renderForDetailView(); } @@ -203,10 +203,6 @@ 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 fba027e838..216227194d 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 phutil_escape_html($this->getValue()); + return $this->getValue(); } diff --git a/src/applications/maniphest/controller/ManiphestExportController.php b/src/applications/maniphest/controller/ManiphestExportController.php index 591e8ff310..a33809b745 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( + $dialog->appendChild(hsprintf( '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( - 'Do you want to export the query results to Excel?
'); + $dialog->appendChild(phutil_tag('p', array(), pht( + '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 34c2b30494..229ba2e1f4 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 = "Task Burn Rate for Project ".$handle->renderLink(); + $header = pht("Task Burn Rate for Project %s", $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 = ''.$fmt.''; + $fmt = hsprintf('%s', $fmt); } else { - $fmt = ''.$fmt.''; + $fmt = hsprintf('%s', $fmt); } return array( diff --git a/src/applications/maniphest/controller/ManiphestSavedQueryListController.php b/src/applications/maniphest/controller/ManiphestSavedQueryListController.php index d6377c10b7..2f80e6028d 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), )), - 'No Default', + phutil_tag('em', array(), 'No Default'), '', '', ); @@ -111,7 +111,7 @@ final class ManiphestSavedQueryListController extends ManiphestController { 'Save Default Query')); $panel->appendChild($table); - $form = phabricator_render_form( + $form = phabricator_form( $user, array( 'method' => 'POST', diff --git a/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php b/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php index 64fa264dc8..ee185362c5 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDescriptionPreviewController.php @@ -18,10 +18,9 @@ final class ManiphestTaskDescriptionPreviewController ManiphestTask::MARKUP_FIELD_DESCRIPTION, $request->getUser()); - $content = - '
| '. - $select_all. - $select_none. - ' | '. - ''. - $export. - ' | '. - ''. - '0 Selected Tasks'. - ' | '. - ''.$submit.' | '. + '%s%s | '. + '%s | '. + '0 Selected Tasks | '. + '%s | '. '
Are you sure you want to delete this client?
' - ); + $dialog->appendChild(phutil_tag('p', array(), pht( + '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 51104ae880..b8d6d65907 100644 --- a/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php +++ b/src/applications/oauthserver/controller/client/PhabricatorOAuthClientListController.php @@ -113,10 +113,8 @@ 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 94c9839d79..4f366c53d9 100644 --- a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationDeleteController.php +++ b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationDeleteController.php @@ -37,20 +37,17 @@ extends PhabricatorOAuthClientAuthorizationBaseController { ->loadOneWhere('phid = %s', $client_phid); if ($client) { - $client_name = phutil_escape_html($client->getName()); - $title .= ' for '.$client_name; + $title .= ' for '.$client->getName(); } 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( - 'Are you sure you want to delete this client authorization?
' - ); + $dialog->appendChild(phutil_tag('p', array(), pht( + '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 c3b0a927af..d45e4dc96d 100644 --- a/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php +++ b/src/applications/oauthserver/controller/clientauthorization/PhabricatorOAuthClientAuthorizationListController.php @@ -137,7 +137,6 @@ 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 58afadf36d..eae6ac2050 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -47,32 +47,25 @@ final class PhabricatorOwnersDetailController $rows = array(); - $rows[] = array( - 'Name', - phutil_escape_html($package->getName())); - $rows[] = array( - 'Description', - phutil_escape_html($package->getDescription())); + $rows[] = array('Name', $package->getName()); + $rows[] = array('Description', $package->getDescription()); $primary_owner = null; $primary_phid = $package->getPrimaryOwnerPHID(); if ($primary_phid && isset($handles[$primary_phid])) { - $primary_owner = - ''.$handles[$primary_phid]->renderLink().''; + $primary_owner = phutil_tag( + 'strong', + array(), + $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 = implode(''.pht('You can not view the live version of this post because it '. + $reasons[] = phutil_tag('p', array(), 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[] = - ''.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[] = 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.')); } if ($reasons) { diff --git a/src/applications/phame/controller/post/PhamePostPreviewController.php b/src/applications/phame/controller/post/PhamePostPreviewController.php index 38b007178d..06fe3de4da 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 = '