1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 15:21:03 +01:00

render_tag -> tag: fix some more callsites

Summary:
  - Crumbs is straightforward.
  - Maniphest does a lot of string construction which isn't i18n or safehtml aware. I cheated under the theory that we'll resolve this properly in {T2217}.

Test Plan: Looked at crumbs and Maniphest.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2432

Differential Revision: https://secure.phabricator.com/D4748
This commit is contained in:
epriestley 2013-01-31 09:07:31 -08:00
parent f705c978b5
commit 95d37af5d9
2 changed files with 24 additions and 7 deletions

View file

@ -164,12 +164,18 @@ final class ManiphestTransactionDetailView extends ManiphestView {
if ($this->getRenderFullSummary()) {
$full_summary = $this->renderFullSummary($transaction);
}
$descs[] = javelin_render_tag(
$descs[] = javelin_tag(
'div',
array(
'sigil' => 'maniphest-transaction-description',
),
$author->renderLink().' '.$desc.'.'.$full_summary);
array(
$author->renderLink(),
' ',
$desc,
'.',
$full_summary,
));
}
if ($this->getRenderSummaryOnly()) {
@ -551,6 +557,11 @@ final class ManiphestTransactionDetailView extends ManiphestView {
return array($type, ' brazenly '.$type."'d", $classes);
}
// TODO: [HTML] This code will all be rewritten when we switch to using
// ApplicationTransactions. It does not handle HTML or translations
// correctly right now.
$desc = phutil_safe_html($desc);
return array($verb, $desc, $classes);
}
@ -579,6 +590,9 @@ final class ManiphestTransactionDetailView extends ManiphestView {
DifferentialChangesetParser::parseRangeSpecification($spec);
$output = $parser->render($range_s, $range_e, $mask);
// TODO: [HTML] DifferentialChangesetParser needs cleanup.
$output = phutil_safe_html($output);
return $output;
}

View file

@ -50,26 +50,29 @@ final class PhabricatorCrumbsView extends AphrontView {
));
}
$action_view = phutil_render_tag(
$action_view = phutil_tag(
'div',
array(
'class' => 'phabricator-crumbs-actions',
),
self::renderSingleView($actions));
$this->renderHTMLView($actions));
}
if ($this->crumbs) {
last($this->crumbs)->setIsLastCrumb(true);
}
return phutil_render_tag(
return phutil_tag(
'div',
array(
'class' => 'phabricator-crumbs-view '.
'sprite-gradient gradient-breadcrumbs',
),
$action_view.
self::renderSingleView($this->crumbs));
$this->renderHTMLView(
array(
$action_view,
$this->crumbs,
)));
}
}