Convert AphrontErrorView to safe HTML

Summary: Done by searching for `AphrontErrorView` and then `appendChild()`.

Test Plan:
Looked at Commit Detail.
Looked at Revision Detail.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4843
This commit is contained in:
vrana
2013-02-06 16:53:49 -08:00
parent 11bb8db970
commit 059920c2da
31 changed files with 152 additions and 141 deletions

View File

@@ -41,10 +41,10 @@ abstract class PhabricatorRepositoryController extends PhabricatorController {
),
'Diffusion User Guide');
$common =
$common = hsprintf(
"Without this daemon, Phabricator will not be able to import or update ".
"repositories. For instructions on starting the daemon, see ".
"<strong>{$documentation}</strong>.";
"repositories. For instructions on starting the daemon, see %s.",
phutil_tag('strong', array(), $documentation));
try {
$daemon_running = $this->isPullDaemonRunning();
@@ -52,17 +52,17 @@ abstract class PhabricatorRepositoryController extends PhabricatorController {
return null;
}
$title = "Repository Daemon Not Running";
$message =
"<p>The repository daemon is not running on this machine. ".
"{$common}</p>";
$message = hsprintf(
"<p>The repository daemon is not running on this machine. %s</p>",
$common);
} catch (Exception $ex) {
$title = "Unable To Verify Repository Daemon";
$message =
$message = hsprintf(
"<p>Unable to determine if the repository daemon is running on this ".
"machine. {$common}</p>".
"<p><strong>Exception:</strong> ".
phutil_escape_html($ex->getMessage()).
"</p>";
"machine. %s</p>".
"<p><strong>Exception:</strong> %s</p>",
$common,
$ex->getMessage());
}
$view = new AphrontErrorView();

View File

@@ -94,8 +94,7 @@ final class PhabricatorRepositoryEditController
$error_view = new AphrontErrorView();
$error_view->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
$error_view->setTitle('Changes Saved');
$error_view->appendChild(
'Repository changes were saved.');
$error_view->appendChild('Repository changes were saved.');
}
$encoding_doc_link = PhabricatorEnv::getDoclink(