'.
'The "xhprof" PHP extension is not available. Install xhprof '.
'to enable the XHProf console plugin. You can find instructions in '.
- 'the '.$install_guide.'.'.
- '
');
+ $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(' ', $reasons);
+ $reasons = phutil_implode_html(phutil_tag('br'), $reasons);
$status_code = $audit->getAuditStatus();
$status = PhabricatorAuditStatusConstants::getStatusName($status_code);
@@ -140,10 +137,10 @@ final class PhabricatorAuditListView extends AphrontView {
$auditor_handle = $this->getHandle($audit->getAuditorPHID());
$rows[] = array(
$commit_name,
- phutil_escape_html($commit_desc),
+ $commit_desc,
$committed,
$auditor_handle->renderLink(),
- phutil_escape_html($status),
+ $status,
$reasons,
);
diff --git a/src/applications/auth/controller/PhabricatorDisabledUserController.php b/src/applications/auth/controller/PhabricatorDisabledUserController.php
index dcd1e36abc..364a9a61ec 100644
--- a/src/applications/auth/controller/PhabricatorDisabledUserController.php
+++ b/src/applications/auth/controller/PhabricatorDisabledUserController.php
@@ -16,8 +16,8 @@ final class PhabricatorDisabledUserController
$failure_view = new AphrontRequestFailureView();
$failure_view->setHeader(pht('Account Disabled'));
- $failure_view->appendChild(
- '
'.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('Forgot Password / Email Login').'
');
+ $panel->appendChild(phutil_tag('h1', array(), pht(
+ 'Forgot Password / Email Login')));
$panel->appendChild($email_auth);
$panel->setNoBackground();
diff --git a/src/applications/auth/controller/PhabricatorEmailTokenController.php b/src/applications/auth/controller/PhabricatorEmailTokenController.php
index 855caa37af..16a828f7de 100644
--- a/src/applications/auth/controller/PhabricatorEmailTokenController.php
+++ b/src/applications/auth/controller/PhabricatorEmailTokenController.php
@@ -50,17 +50,16 @@ final class PhabricatorEmailTokenController
$view = new AphrontRequestFailureView();
$view->setHeader(pht('Unable to Login'));
- $view->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(
'
');
+ '%s'.
+ '',
+ pht('Send Another Email')));
return $this->buildStandardPageResponse(
$view,
diff --git a/src/applications/auth/controller/PhabricatorLDAPLoginController.php b/src/applications/auth/controller/PhabricatorLDAPLoginController.php
index 4dafe831f7..bbe64ccbd6 100644
--- a/src/applications/auth/controller/PhabricatorLDAPLoginController.php
+++ b/src/applications/auth/controller/PhabricatorLDAPLoginController.php
@@ -43,12 +43,11 @@ final class PhabricatorLDAPLoginController extends PhabricatorAuthController {
$dialog = new AphrontDialogView();
$dialog->setUser($current_user);
$dialog->setTitle(pht('Already Linked to Another Account'));
- $dialog->appendChild(
- '
'.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.').'
'.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(
- '
');
+ '%s'.
+ '',
+ pht('Try Again')));
return $this->buildStandardPageResponse(
$view,
array(
diff --git a/src/applications/auth/controller/PhabricatorLogoutController.php b/src/applications/auth/controller/PhabricatorLogoutController.php
index e2cc5410fa..f75b4c601d 100644
--- a/src/applications/auth/controller/PhabricatorLogoutController.php
+++ b/src/applications/auth/controller/PhabricatorLogoutController.php
@@ -46,7 +46,8 @@ final class PhabricatorLogoutController
$dialog = id(new AphrontDialogView())
->setUser($user)
->setTitle(pht('Log out of Phabricator?'))
- ->appendChild('
'.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(
- '
'.
- phabricator_form(
- $user,
+ '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(
+ '
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(
'
');
+ ''));
$utils->setWidth(AphrontPanelView::WIDTH_FULL);
$this->setShowSideNav(false);
diff --git a/src/applications/conduit/controller/PhabricatorConduitLogController.php b/src/applications/conduit/controller/PhabricatorConduitLogController.php
index a6bcbf74d7..c752714dda 100644
--- a/src/applications/conduit/controller/PhabricatorConduitLogController.php
+++ b/src/applications/conduit/controller/PhabricatorConduitLogController.php
@@ -65,9 +65,9 @@ final class PhabricatorConduitLogController
}
$rows[] = array(
$call->getConnectionID(),
- phutil_escape_html($conn->getUserName()),
- phutil_escape_html($call->getMethod()),
- phutil_escape_html($call->getError()),
+ $conn->getUserName(),
+ $call->getMethod(),
+ $call->getError(),
number_format($call->getDuration()).' us',
phabricator_datetime($call->getDateCreated(), $user),
);
diff --git a/src/applications/config/controller/PhabricatorConfigAllController.php b/src/applications/config/controller/PhabricatorConfigAllController.php
index 60f95b2263..69daa9a760 100644
--- a/src/applications/config/controller/PhabricatorConfigAllController.php
+++ b/src/applications/config/controller/PhabricatorConfigAllController.php
@@ -14,13 +14,12 @@ final class PhabricatorConfigAllController
$key = $option->getKey();
if ($option->getMasked()) {
- $value = ''.pht('Masked').'';
+ $value = phutil_tag('em', array(), pht('Masked'));
} else if ($option->getHidden()) {
- $value = ''.pht('Hidden').'';
+ $value = phutil_tag('em', array(), pht('Hidden'));
} else {
$value = PhabricatorEnv::getEnvConfig($key);
$value = PhabricatorConfigJSON::prettyPrintJSON($value);
- $value = phutil_escape_html($value);
}
$rows[] = array(
diff --git a/src/applications/config/response/PhabricatorConfigResponse.php b/src/applications/config/response/PhabricatorConfigResponse.php
index 479df39cd1..923313bb2a 100644
--- a/src/applications/config/response/PhabricatorConfigResponse.php
+++ b/src/applications/config/response/PhabricatorConfigResponse.php
@@ -23,20 +23,18 @@ final class PhabricatorConfigResponse extends AphrontHTMLResponse {
$view = $this->view->render();
- $template = <<
-
-
- Phabricator Setup
- {$resources}
-
-
- {$view}
-
-
-EOTEMPLATE;
-
- return $template;
+ return hsprintf(
+ ''.
+ ''.
+ ''.
+ ''.
+ 'Phabricator Setup'.
+ '%s'.
+ ''.
+ '%s'.
+ '',
+ $resources,
+ $view);
}
private function buildResources() {
@@ -49,11 +47,12 @@ EOTEMPLATE;
$resources = array();
foreach ($css as $path) {
- $resources[] = '';
+ $resources[] = phutil_tag(
+ 'style',
+ array('type' => 'text/css'),
+ Filesystem::readFile($webroot.'/rsrc/css/'.$path));
}
- return implode("\n", $resources);
+ return phutil_implode_html("\n", $resources);
}
diff --git a/src/applications/config/view/PhabricatorSetupIssueView.php b/src/applications/config/view/PhabricatorSetupIssueView.php
index 203a62b81b..6912054f67 100644
--- a/src/applications/config/view/PhabricatorSetupIssueView.php
+++ b/src/applications/config/view/PhabricatorSetupIssueView.php
@@ -44,7 +44,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
),
array(
phutil_tag('p', array(), $run_these),
- phutil_tag('pre', array(), array_interleave("\n", $commands)),
+ phutil_tag('pre', array(), phutil_implode_html("\n", $commands)),
));
}
@@ -114,7 +114,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
array(
'class' => 'setup-issue',
),
- $this->renderHTMLView(
+ $this->renderSingleView(
array(
$name,
$description,
@@ -155,7 +155,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
'phabricator/ $ ./bin/config set %s value',
$key);
}
- $update = phutil_tag('pre', array(), array_interleave("\n", $update));
+ $update = phutil_tag('pre', array(), phutil_implode_html("\n", $update));
} else {
$update = array();
foreach ($configs as $config) {
@@ -187,7 +187,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
array(
'class' => 'setup-issue-config',
),
- self::renderHTMLView(
+ self::renderSingleView(
array(
$table_info,
$table,
@@ -293,7 +293,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
array(
'class' => 'setup-issue-config',
),
- $this->renderHTMLView(
+ $this->renderSingleView(
array(
$table_info,
$table,
diff --git a/src/applications/conpherence/controller/ConpherenceController.php b/src/applications/conpherence/controller/ConpherenceController.php
index 006049b9c7..67fecfe264 100644
--- a/src/applications/conpherence/controller/ConpherenceController.php
+++ b/src/applications/conpherence/controller/ConpherenceController.php
@@ -159,8 +159,7 @@ abstract class ConpherenceController extends PhabricatorController {
$item->addClass('hide-unread-count');
}
- // TODO: [HTML] Clean this up when we clean up HTML stuff in Conpherence.
- $nav->addCustomBlock(phutil_safe_html($item->render()));
+ $nav->addCustomBlock($item->render());
}
if (empty($conpherences) || $read) {
$nav->addCustomBlock($this->getNoConpherencesBlock());
diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php
index 66f80ba133..65eee271f9 100644
--- a/src/applications/conpherence/controller/ConpherenceViewController.php
+++ b/src/applications/conpherence/controller/ConpherenceViewController.php
@@ -149,7 +149,7 @@ final class ConpherenceViewController extends
->setMarkupEngine($engine)
->render();
}
- $transactions = implode(' ', $rendered_transactions);
+ $transactions = phutil_implode_html(' ', $rendered_transactions);
$form =
id(new AphrontFormView())
@@ -283,7 +283,7 @@ final class ConpherenceViewController extends
'src' => $thumb
),
''),
- phutil_escape_html($file->getName()),
+ $file->getName(),
);
}
$header = id(new PhabricatorHeaderView())
@@ -292,7 +292,7 @@ final class ConpherenceViewController extends
->setNoDataString(pht('No files attached to conpherence.'))
->setHeaders(array('', pht('Name')))
->setColumnClasses(array('', 'wide'));
- return new PhutilSafeHTML($header->render() . $table->render());
+ return hsprintf('%s%s', $header->render(), $table->render());
}
private function renderTaskWidgetPaneContent() {
@@ -328,7 +328,7 @@ final class ConpherenceViewController extends
->setColumnClasses(array('', 'wide'));
$content[] = $table->render();
}
- return new PhutilSafeHTML(implode('', $content));
+ return phutil_implode_html('', $content);
}
private function renderCalendarWidgetPaneContent() {
@@ -416,7 +416,7 @@ final class ConpherenceViewController extends
}
}
- return new PhutilSafeHTML(implode('', $content));
+ return phutil_implode_html('', $content);
}
private function getCalendarWidgetWeekTimestamps() {
diff --git a/src/applications/conpherence/storage/ConpherenceTransaction.php b/src/applications/conpherence/storage/ConpherenceTransaction.php
index 64afcf9157..b2ff0f97c0 100644
--- a/src/applications/conpherence/storage/ConpherenceTransaction.php
+++ b/src/applications/conpherence/storage/ConpherenceTransaction.php
@@ -50,18 +50,18 @@ final class ConpherenceTransaction extends PhabricatorApplicationTransaction {
$title = pht(
'%s renamed this conpherence from "%s" to "%s".',
$this->renderHandleLink($author_phid),
- phutil_escape_html($old),
- phutil_escape_html($new));
+ $old,
+ $new);
} else if ($old) {
$title = pht(
'%s deleted the conpherence name "%s".',
$this->renderHandleLink($author_phid),
- phutil_escape_html($old));
+ $old);
} else {
$title = pht(
'%s named this conpherence "%s".',
$this->renderHandleLink($author_phid),
- phutil_escape_html($new));
+ $new);
}
return $title;
case ConpherenceTransactionType::TYPE_FILES:
diff --git a/src/applications/conpherence/view/ConpherenceMenuItemView.php b/src/applications/conpherence/view/ConpherenceMenuItemView.php
index c69d7c502d..539a107122 100644
--- a/src/applications/conpherence/view/ConpherenceMenuItemView.php
+++ b/src/applications/conpherence/view/ConpherenceMenuItemView.php
@@ -139,7 +139,7 @@ final class ConpherenceMenuItemView extends AphrontTagView {
(int)$this->unreadCount);
}
- return $this->renderHTMLView(
+ return $this->renderSingleView(
array(
$image,
$title,
diff --git a/src/applications/conpherence/view/ConpherenceTransactionView.php b/src/applications/conpherence/view/ConpherenceTransactionView.php
index 2d785dc225..13238c04ec 100644
--- a/src/applications/conpherence/view/ConpherenceTransactionView.php
+++ b/src/applications/conpherence/view/ConpherenceTransactionView.php
@@ -87,7 +87,7 @@ final class ConpherenceTransactionView extends AphrontView {
array(
'class' => $content_class
),
- $this->renderHTMLView($content))
+ $this->renderSingleView($content))
);
return $transaction_view->render();
diff --git a/src/applications/countdown/controller/PhabricatorCountdownListController.php b/src/applications/countdown/controller/PhabricatorCountdownListController.php
index 93e4a916b7..b503d241d3 100644
--- a/src/applications/countdown/controller/PhabricatorCountdownListController.php
+++ b/src/applications/countdown/controller/PhabricatorCountdownListController.php
@@ -46,7 +46,7 @@ final class PhabricatorCountdownListController
'Delete');
}
$rows[] = array(
- phutil_escape_html($timer->getID()),
+ $timer->getID(),
$handles[$timer->getAuthorPHID()]->renderLink(),
phutil_tag(
'a',
diff --git a/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php b/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
index 26059e4ce2..f9a6d4615b 100644
--- a/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
+++ b/src/applications/daemon/controller/PhabricatorDaemonConsoleController.php
@@ -30,7 +30,7 @@ final class PhabricatorDaemonConsoleController
$rows = array();
foreach ($completed_info as $class => $info) {
$rows[] = array(
- phutil_escape_html($class),
+ $class,
number_format($info['n']),
number_format((int)($info['duration'] / $info['n'])).' us',
);
@@ -127,7 +127,7 @@ final class PhabricatorDaemonConsoleController
$rows = array();
foreach ($queued as $row) {
$rows[] = array(
- phutil_escape_html($row['taskClass']),
+ $row['taskClass'],
number_format($row['N']),
);
}
diff --git a/src/applications/daemon/controller/PhabricatorWorkerTaskUpdateController.php b/src/applications/daemon/controller/PhabricatorWorkerTaskUpdateController.php
index 72f9e256aa..811ef354be 100644
--- a/src/applications/daemon/controller/PhabricatorWorkerTaskUpdateController.php
+++ b/src/applications/daemon/controller/PhabricatorWorkerTaskUpdateController.php
@@ -72,41 +72,40 @@ final class PhabricatorWorkerTaskUpdateController
case 'retry':
if ($can_retry) {
$dialog->setTitle('Really retry task?');
- $dialog->appendChild(
- '
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(' ');
- $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('This diff belongs to revision %s', $link)."
'.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
', $cov_class);
$n_colspan--;
}
@@ -242,7 +242,7 @@ final class DifferentialChangesetTwoUpRenderer
$n_classes = $n_class;
if ($new_lines[$ii]['type'] == '\\' || !isset($copy_lines[$n_num])) {
- $n_copy = '
';
+ $n_copy = hsprintf('
', $n_class);
} else {
list($orig_file, $orig_line, $orig_type) = $copy_lines[$n_num];
$title = ($orig_type == '-' ? 'Moved' : 'Copied').' from ';
@@ -274,13 +274,13 @@ final class DifferentialChangesetTwoUpRenderer
}
if ($o_num && $left_id) {
- $o_id = ' id="C'.$left_id.$left_char.'L'.$o_num.'"';
+ $o_id = 'C'.$left_id.$left_char.'L'.$o_num;
} else {
$o_id = null;
}
if ($n_num && $right_id) {
- $n_id = ' id="C'.$right_id.$right_char.'L'.$n_num.'"';
+ $n_id = 'C'.$right_id.$right_char.'L'.$n_num;
} else {
$n_id = null;
}
@@ -288,20 +288,26 @@ final class DifferentialChangesetTwoUpRenderer
// NOTE: The Javascript is sensitive to whitespace changes in this
// block!
- $html[] =
+ $html[] = hsprintf(
'
'.
- '
'.$o_num.'
'.
- '
'.$o_text.'
'.
- '
'.$n_num.'
'.
- $n_copy.
+ '%s'.
+ '
%s
'.
+ '%s'.
+ '%s'.
// NOTE: This is a unicode zero-width space, which we use as a hint
// when intercepting 'copy' events to make sure sensible text ends
// up on the clipboard. See the 'phabricator-oncopy' behavior.
- '
')
+ ->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 =
- '
', $content);
$header->appendChild($content);
if ($user->getPHID() == $viewer->getPHID()) {
@@ -172,13 +172,11 @@ final class PhabricatorPeopleProfileController
$blurb = nonempty(
$profile->getBlurb(),
- '//'.
- pht('Nothing is known about this rare specimen.')
- .'//'
+ '//'.pht('Nothing is known about this rare specimen.').'//'
);
$engine = PhabricatorMarkupEngine::newProfileMarkupEngine();
- $blurb = phutil_safe_html($engine->markupText($blurb));
+ $blurb = $engine->markupText($blurb);
$viewer = $this->getRequest()->getUser();
@@ -232,12 +230,11 @@ final class PhabricatorPeopleProfileController
$builder->setUser($viewer);
$view = $builder->buildView();
- return
+ return hsprintf(
'
Activity Feed
-
- '.$view->render().'
-
-
';
+
%s
+
',
+ $view->render());
}
}
diff --git a/src/applications/phame/controller/blog/PhameBlogDeleteController.php b/src/applications/phame/controller/blog/PhameBlogDeleteController.php
index eb6f4695a8..e6d9b4dff6 100644
--- a/src/applications/phame/controller/blog/PhameBlogDeleteController.php
+++ b/src/applications/phame/controller/blog/PhameBlogDeleteController.php
@@ -41,7 +41,7 @@ final class PhameBlogDeleteController extends PhameController {
->appendChild(
pht(
'Really delete the blog "%s"? It will be gone forever.',
- phutil_escape_html($blog->getName())))
+ $blog->getName()))
->addSubmitButton(pht('Delete'))
->addCancelButton($cancel_uri);
diff --git a/src/applications/phame/controller/post/PhamePostDeleteController.php b/src/applications/phame/controller/post/PhamePostDeleteController.php
index 26719ff61c..8faa715a5e 100644
--- a/src/applications/phame/controller/post/PhamePostDeleteController.php
+++ b/src/applications/phame/controller/post/PhamePostDeleteController.php
@@ -41,7 +41,7 @@ final class PhamePostDeleteController extends PhameController {
->appendChild(
pht(
'Really delete the post "%s"? It will be gone forever.',
- phutil_escape_html($post->getTitle())))
+ $post->getTitle()))
->addSubmitButton(pht('Delete'))
->addCancelButton($cancel_uri);
diff --git a/src/applications/phame/controller/post/PhamePostEditController.php b/src/applications/phame/controller/post/PhamePostEditController.php
index 20217edc51..9af5a98b43 100644
--- a/src/applications/phame/controller/post/PhamePostEditController.php
+++ b/src/applications/phame/controller/post/PhamePostEditController.php
@@ -148,7 +148,7 @@ final class PhamePostEditController
->setValue($submit_button)
);
- $preview_panel =
+ $preview_panel = hsprintf(
'
Post Preview
@@ -158,7 +158,7 @@ final class PhamePostEditController
Loading preview...
- ';
+ ');
require_celerity_resource('phame-css');
Javelin::initBehavior(
diff --git a/src/applications/phame/controller/post/PhamePostNotLiveController.php b/src/applications/phame/controller/post/PhamePostNotLiveController.php
index c2b4983736..885bc3b1a9 100644
--- a/src/applications/phame/controller/post/PhamePostNotLiveController.php
+++ b/src/applications/phame/controller/post/PhamePostNotLiveController.php
@@ -25,16 +25,16 @@ final class PhamePostNotLiveController extends PhameController {
$reasons = array();
if (!$post->getBlog()) {
- $reasons[] =
- '
'.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 = '
'.$content.'
';
+ $content = hsprintf('
%s
', $content);
return id(new AphrontAjaxResponse())->setContent($content);
}
diff --git a/src/applications/phame/controller/post/PhamePostUnpublishController.php b/src/applications/phame/controller/post/PhamePostUnpublishController.php
index efc8153dab..f70cff773c 100644
--- a/src/applications/phame/controller/post/PhamePostUnpublishController.php
+++ b/src/applications/phame/controller/post/PhamePostUnpublishController.php
@@ -45,7 +45,7 @@ final class PhamePostUnpublishController extends PhameController {
pht(
'The post "%s" will no longer be visible to other users until you '.
'republish it.',
- phutil_escape_html($post->getTitle())))
+ $post->getTitle()))
->addSubmitButton(pht('Unpublish'))
->addCancelButton($cancel_uri);
diff --git a/src/applications/phame/skins/PhameBasicBlogSkin.php b/src/applications/phame/skins/PhameBasicBlogSkin.php
index 569bb6b3b3..2c6f91e97b 100644
--- a/src/applications/phame/skins/PhameBasicBlogSkin.php
+++ b/src/applications/phame/skins/PhameBasicBlogSkin.php
@@ -123,7 +123,7 @@ abstract class PhameBasicBlogSkin extends PhameBlogSkin {
}
protected function render404Page() {
- return '
404 Not Found
';
+ return hsprintf('
404 Not Found
');
}
final public function getResourceURI($resource) {
diff --git a/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php b/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php
index 39dc7df989..7ccd2cffe9 100644
--- a/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php
+++ b/src/applications/phame/skins/PhameBasicTemplateBlogSkin.php
@@ -26,7 +26,7 @@ final class PhameBasicTemplateBlogSkin extends PhameBasicBlogSkin {
'href' => $this->getResourceURI('css/'.$path),
));
}
- $this->cssResources = implode("\n", $this->cssResources);
+ $this->cssResources = phutil_implode_html("\n", $this->cssResources);
}
$request = $this->getRequest();
@@ -43,7 +43,7 @@ final class PhameBasicTemplateBlogSkin extends PhameBasicBlogSkin {
);
$response = new AphrontWebpageResponse();
- $response->setContent(implode("\n", $content));
+ $response->setContent(phutil_implode_html("\n", $content));
return $response;
}
diff --git a/src/applications/phid/controller/PhabricatorPHIDLookupController.php b/src/applications/phid/controller/PhabricatorPHIDLookupController.php
index c6228df5c2..e7c93f60ba 100644
--- a/src/applications/phid/controller/PhabricatorPHIDLookupController.php
+++ b/src/applications/phid/controller/PhabricatorPHIDLookupController.php
@@ -24,9 +24,9 @@ final class PhabricatorPHIDLookupController
}
$rows[] = array(
- phutil_escape_html($handle->getPHID()),
- phutil_escape_html($handle->getType()),
- phutil_escape_html($handle->getName()),
+ $handle->getPHID(),
+ $handle->getType(),
+ $handle->getName(),
$link,
);
}
diff --git a/src/applications/pholio/controller/PholioMockViewController.php b/src/applications/pholio/controller/PholioMockViewController.php
index 94a3e447c7..361b7257fb 100644
--- a/src/applications/pholio/controller/PholioMockViewController.php
+++ b/src/applications/pholio/controller/PholioMockViewController.php
@@ -145,7 +145,7 @@ final class PholioMockViewController extends PholioController {
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/pholio/storage/PholioTransaction.php b/src/applications/pholio/storage/PholioTransaction.php
index 55a5ab7ba6..ece88cbdd5 100644
--- a/src/applications/pholio/storage/PholioTransaction.php
+++ b/src/applications/pholio/storage/PholioTransaction.php
@@ -44,15 +44,15 @@ final class PholioTransaction extends PhabricatorApplicationTransaction {
return pht(
'%s renamed this mock from "%s" to "%s".',
$this->renderHandleLink($author_phid),
- phutil_escape_html($old),
- phutil_escape_html($new));
+ $old,
+ $new);
break;
case PholioTransactionType::TYPE_DESCRIPTION:
return pht(
'%s updated the description of this mock. '.
'The old description was: %s',
$this->renderHandleLink($author_phid),
- phutil_escape_html($old));
+ $old);
}
return parent::getTitle();
diff --git a/src/applications/pholio/view/PholioMockImagesView.php b/src/applications/pholio/view/PholioMockImagesView.php
index b43020e8f1..7ab6363b89 100644
--- a/src/applications/pholio/view/PholioMockImagesView.php
+++ b/src/applications/pholio/view/PholioMockImagesView.php
@@ -91,6 +91,6 @@ final class PholioMockImagesView extends AphrontView {
$thumbnails);
}
- return $this->renderHTMLView($mockview);
+ return $this->renderSingleView($mockview);
}
}
diff --git a/src/applications/phpast/controller/PhabricatorXHPASTViewFramesetController.php b/src/applications/phpast/controller/PhabricatorXHPASTViewFramesetController.php
index c21f9f2b0b..bec14d9a21 100644
--- a/src/applications/phpast/controller/PhabricatorXHPASTViewFramesetController.php
+++ b/src/applications/phpast/controller/PhabricatorXHPASTViewFramesetController.php
@@ -14,12 +14,15 @@ final class PhabricatorXHPASTViewFramesetController
$response = new AphrontWebpageResponse();
$response->setFrameable(true);
- $response->setContent(
- '');
+ $response->setContent(hsprintf(
+ '',
+ $id,
+ $id,
+ $id));
return $response;
}
diff --git a/src/applications/phpast/controller/PhabricatorXHPASTViewInputController.php b/src/applications/phpast/controller/PhabricatorXHPASTViewInputController.php
index 0d90598190..48ba6afc33 100644
--- a/src/applications/phpast/controller/PhabricatorXHPASTViewInputController.php
+++ b/src/applications/phpast/controller/PhabricatorXHPASTViewInputController.php
@@ -5,7 +5,6 @@ final class PhabricatorXHPASTViewInputController
public function processRequest() {
$input = $this->getStorageTree()->getInput();
- return $this->buildXHPASTViewPanelResponse(
- phutil_escape_html($input));
+ return $this->buildXHPASTViewPanelResponse($input);
}
}
diff --git a/src/applications/phpast/controller/PhabricatorXHPASTViewPanelController.php b/src/applications/phpast/controller/PhabricatorXHPASTViewPanelController.php
index b4494eb44e..0e43c418f1 100644
--- a/src/applications/phpast/controller/PhabricatorXHPASTViewPanelController.php
+++ b/src/applications/phpast/controller/PhabricatorXHPASTViewPanelController.php
@@ -20,7 +20,7 @@ abstract class PhabricatorXHPASTViewPanelController
}
protected function buildXHPASTViewPanelResponse($content) {
- $content =
+ $content = hsprintf(
''.
''.
''.
@@ -57,10 +57,9 @@ li span {
'.
''.
- ''.
- $content.
- ''.
- '';
+ '%s'.
+ '