Convert setCaption() to safe HTML

Test Plan: /settings/panel/display/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4824
This commit is contained in:
vrana
2013-02-05 13:23:05 -08:00
parent bcf9b9d4a7
commit be4662e667
15 changed files with 52 additions and 45 deletions

View File

@@ -245,12 +245,13 @@ final class ManiphestReportController extends ManiphestController {
if ($handle) {
$header = "Task Burn Rate for Project ".$handle->renderLink();
$caption = "<p>NOTE: This table reflects tasks <em>currently</em> in ".
"the project. If a task was opened in the past but added to ".
"the project recently, it is counted on the day it was ".
"opened, not the day it was categorized. If a task was part ".
"of this project in the past but no longer is, it is not ".
"counted at all.</p>";
$caption = hsprintf(
"<p>NOTE: This table reflects tasks <em>currently</em> in ".
"the project. If a task was opened in the past but added to ".
"the project recently, it is counted on the day it was ".
"opened, not the day it was categorized. If a task was part ".
"of this project in the past but no longer is, it is not ".
"counted at all.</p>");
} else {
$header = "Task Burn Rate for All Tasks";
$caption = null;

View File

@@ -478,8 +478,9 @@ final class ManiphestTaskEditController extends ManiphestController {
$email_create = PhabricatorEnv::getEnvConfig(
'metamta.maniphest.public-create-email');
if (!$task->getID() && $email_create) {
$email_hint = pht('You can also create tasks by sending an email to: ').
'<tt>'.phutil_escape_html($email_create).'</tt>';
$email_hint = pht(
'You can also create tasks by sending an email to: %s',
phutil_tag('tt', array(), $email_create));
$description_control->setCaption($email_hint);
}