Convert AphrontTableView to safe HTML
Summary:
Lots of killed `phutil_escape_html()`.
Done by searching for `AphrontTableView` and then `$rows` (usually) backwards.
Test Plan:
Looked at homepage.
echo id(new AphrontTableView(array(array('<'))))->render();
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4884
This commit is contained in:
@@ -103,7 +103,7 @@ final class DiffusionExternalController extends DiffusionController {
|
||||
'href' => $href,
|
||||
),
|
||||
'r'.$repo->getCallsign().$commit->getCommitIdentifier()),
|
||||
phutil_escape_html($commit->loadCommitData()->getSummary()),
|
||||
$commit->loadCommitData()->getSummary(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ final class DiffusionHomeController extends DiffusionController {
|
||||
'href' => $shortcut->getHref(),
|
||||
),
|
||||
$shortcut->getName()),
|
||||
phutil_escape_html($shortcut->getDescription()),
|
||||
$shortcut->getDescription(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ final class DiffusionHomeController extends DiffusionController {
|
||||
'href' => '/diffusion/'.$repository->getCallsign().'/',
|
||||
),
|
||||
$repository->getName()),
|
||||
phutil_escape_html($repository->getDetail('description')),
|
||||
$repository->getDetail('description'),
|
||||
PhabricatorRepositoryType::getNameForRepositoryType(
|
||||
$repository->getVersionControlSystem()),
|
||||
$size,
|
||||
|
||||
@@ -71,11 +71,10 @@ final class DiffusionLintController extends DiffusionController {
|
||||
'<a href="%s">%s</a>',
|
||||
$drequest->generateURI(array('action' => 'lint')),
|
||||
$drequest->getCallsign()),
|
||||
phutil_escape_html(ArcanistLintSeverity::getStringForSeverity(
|
||||
$code['maxSeverity'])),
|
||||
phutil_escape_html($code['code']),
|
||||
phutil_escape_html($code['maxName']),
|
||||
phutil_escape_html($code['maxDescription']),
|
||||
ArcanistLintSeverity::getStringForSeverity($code['maxSeverity']),
|
||||
$code['code'],
|
||||
$code['maxName'],
|
||||
$code['maxDescription'],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,9 @@ final class DiffusionLintDetailsController extends DiffusionController {
|
||||
$rows[] = array(
|
||||
$path,
|
||||
$line,
|
||||
phutil_escape_html(ArcanistLintSeverity::getStringForSeverity(
|
||||
$message['severity'])),
|
||||
phutil_escape_html($message['name']),
|
||||
phutil_escape_html($message['description']),
|
||||
ArcanistLintSeverity::getStringForSeverity($message['severity']),
|
||||
$message['name'],
|
||||
$message['description'],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,9 +125,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
|
||||
$rows = array();
|
||||
foreach ($properties as $key => $value) {
|
||||
$rows[] = array(
|
||||
phutil_escape_html($key),
|
||||
phutil_escape_html($value));
|
||||
$rows[] = array($key, $value);
|
||||
}
|
||||
|
||||
$table = new AphrontTableView($rows);
|
||||
|
||||
@@ -81,8 +81,8 @@ final class DiffusionSymbolController extends DiffusionController {
|
||||
$project_name = '-';
|
||||
}
|
||||
|
||||
$file = phutil_escape_html($symbol->getPath());
|
||||
$line = phutil_escape_html($symbol->getLineNumber());
|
||||
$file = $symbol->getPath();
|
||||
$line = $symbol->getLineNumber();
|
||||
|
||||
$repo = $symbol->getRepository();
|
||||
if ($repo) {
|
||||
@@ -101,17 +101,17 @@ final class DiffusionSymbolController extends DiffusionController {
|
||||
),
|
||||
$file.':'.$line);
|
||||
} else if ($file) {
|
||||
$location = phutil_escape_html($file.':'.$line);
|
||||
$location = $file.':'.$line;
|
||||
} else {
|
||||
$location = '?';
|
||||
}
|
||||
|
||||
$rows[] = array(
|
||||
phutil_escape_html($symbol->getSymbolType()),
|
||||
phutil_escape_html($symbol->getSymbolContext()),
|
||||
phutil_escape_html($symbol->getSymbolName()),
|
||||
phutil_escape_html($symbol->getSymbolLanguage()),
|
||||
phutil_escape_html($project_name),
|
||||
$symbol->getSymbolType(),
|
||||
$symbol->getSymbolContext(),
|
||||
$symbol->getSymbolName(),
|
||||
$symbol->getSymbolLanguage(),
|
||||
$project_name,
|
||||
$location,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user