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:
parent
7ec8e885e1
commit
e4736bf977
5 changed files with 4 additions and 10 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.';
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.';
|
||||
|
|
Loading…
Add table
Reference in a new issue