1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-02 09:58:24 +01:00

Avoid double escaping in error view title

Summary: Searched for `AphrontErrorView` and then for `setTitle()`.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4880
This commit is contained in:
vrana 2013-02-09 09:23:02 -08:00
parent 7ec8e885e1
commit e4736bf977
5 changed files with 4 additions and 10 deletions

View file

@ -209,7 +209,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();
@ -226,7 +226,7 @@ class AphrontDefaultApplicationConfiguration
// Always log the unhandled exception.
phlog($ex);
$class = phutil_escape_html(get_class($ex));
$class = get_class($ex);
$message = phutil_escape_html($ex->getMessage());
if ($ex instanceof AphrontQuerySchemaException) {

View file

@ -32,8 +32,7 @@ extends PhabricatorOAuthClientBaseController {
->setURI('/oauthserver/client/?deleted=1');
}
$client_name = phutil_escape_html($client->getName());
$title .= ' '.$client_name;
$title .= ' '.$client->getName();
$dialog = new AphrontDialogView();
$dialog->setUser($current_user);

View file

@ -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.';

View file

@ -37,12 +37,10 @@ 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();

View file

@ -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.';