1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 15:22:41 +01:00

Add javelin_tag(), convert easy callsites

Summary:
  - Implements `javelin_tag()`, which is `javelin_render_tag()` on top of `phutil_tag()` instead of `phutil_render_tag()`.
  - Manually converts all or almost all of the trivial callsites.

Test Plan:
  - Site does not seem any more broken than before.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4639
This commit is contained in:
epriestley 2013-01-25 12:57:17 -08:00
parent 94da7c2033
commit 3093d1663d
66 changed files with 188 additions and 171 deletions

View file

@ -97,7 +97,7 @@ final class DarkConsoleCore {
$tabclass = null; $tabclass = null;
} }
$tabs_markup[] = javelin_render_tag( $tabs_markup[] = javelin_tag(
'a', 'a',
array( array(
'class' => "dark-console-tab {$tabclass}", 'class' => "dark-console-tab {$tabclass}",
@ -173,7 +173,7 @@ final class DarkConsoleCore {
), ),
'<tr>'. '<tr>'.
'<th class="dark-console-tabs">'. '<th class="dark-console-tabs">'.
javelin_render_tag( phutil_tag(
'a', 'a',
array( array(
'class' => 'dark-console-tab dark-console-tab-selected', 'class' => 'dark-console-tab dark-console-tab-selected',

View file

@ -291,7 +291,7 @@ final class AphrontCalendarMonthView extends AphrontView {
$href = null; $href = null;
} }
$text_div = javelin_render_tag( $text_div = javelin_tag(
$tag, $tag,
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
@ -302,9 +302,9 @@ final class AphrontCalendarMonthView extends AphrontView {
'class' => 'aphront-calendar-event-text', 'class' => 'aphront-calendar-event-text',
'href' => $href, 'href' => $href,
), ),
phutil_escape_html(phutil_utf8_shorten($event->getName(), 32))); phutil_utf8_shorten($event->getName(), 32));
return javelin_render_tag( return javelin_tag(
'div', 'div',
array( array(
'class' => implode(' ', $classes), 'class' => implode(' ', $classes),

View file

@ -163,29 +163,33 @@ final class ConpherenceViewController extends
array( array(
'class' => 'widgets-header' 'class' => 'widgets-header'
), ),
javelin_render_tag( array(
'a', javelin_tag(
array( 'a',
'sigil' => 'conpherence-change-widget', array(
'meta' => array('widget' => 'widgets-files') 'sigil' => 'conpherence-change-widget',
'meta' => array('widget' => 'widgets-files')
),
pht('Files')
), ),
pht('Files') ' | ',
).' | '. javelin_tag(
javelin_render_tag( 'a',
'a', array(
array( 'sigil' => 'conpherence-change-widget',
'sigil' => 'conpherence-change-widget', 'meta' => array('widget' => 'widgets-tasks')
'meta' => array('widget' => 'widgets-tasks') ),
pht('Tasks')
), ),
pht('Tasks') ' | ',
).' | '. javelin_tag(
javelin_render_tag( 'a',
'a', array(
array( 'sigil' => 'conpherence-change-widget',
'sigil' => 'conpherence-change-widget', 'meta' => array('widget' => 'widgets-calendar')
'meta' => array('widget' => 'widgets-calendar') ),
pht('Calendar')
), ),
pht('Calendar')
) )
). ).
phutil_render_tag( phutil_render_tag(

View file

@ -36,7 +36,7 @@ final class PhabricatorCountdownListController
), ),
'Edit'); 'Edit');
$delete_button = javelin_render_tag( $delete_button = javelin_tag(
'a', 'a',
array( array(
'class' => 'small button grey', 'class' => 'small button grey',

View file

@ -47,13 +47,13 @@ final class PhabricatorCountdownViewController
<th>Seconds</th> <th>Seconds</th>
</tr> </tr>
<tr>'. <tr>'.
javelin_render_tag('td', javelin_tag('td',
array('sigil' => 'phabricator-timer-days'), ''). array('sigil' => 'phabricator-timer-days'), '').
javelin_render_tag('td', javelin_tag('td',
array('sigil' => 'phabricator-timer-hours'), ''). array('sigil' => 'phabricator-timer-hours'), '').
javelin_render_tag('td', javelin_tag('td',
array('sigil' => 'phabricator-timer-minutes'), ''). array('sigil' => 'phabricator-timer-minutes'), '').
javelin_render_tag('td', javelin_tag('td',
array('sigil' => 'phabricator-timer-seconds'), ''). array('sigil' => 'phabricator-timer-seconds'), '').
'</tr> '</tr>
</table> </table>

View file

@ -146,7 +146,7 @@ final class DifferentialReviewersFieldSpecification
$names[] = phutil_escape_html( $names[] = phutil_escape_html(
$this->getHandle($reviewer)->getLinkName()); $this->getHandle($reviewer)->getLinkName());
} }
$suffix = ' '.javelin_render_tag( $suffix = ' '.javelin_tag(
'abbr', 'abbr',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',

View file

@ -321,7 +321,7 @@ abstract class DifferentialChangesetHTMLRenderer
$more = null; $more = null;
if ($force !== 'none') { if ($force !== 'none') {
$more = ' '.javelin_render_tag( $more = ' '.javelin_tag(
'a', 'a',
array( array(
'mustcapture' => true, 'mustcapture' => true,

View file

@ -16,7 +16,7 @@ final class DifferentialChangesetTwoUpRenderer
$context_not_available = null; $context_not_available = null;
if ($hunk_starts) { if ($hunk_starts) {
$context_not_available = javelin_render_tag( $context_not_available = javelin_tag(
'tr', 'tr',
array( array(
'sigil' => 'context-target', 'sigil' => 'context-target',
@ -83,7 +83,7 @@ final class DifferentialChangesetTwoUpRenderer
$is_first_block = true; $is_first_block = true;
} }
$contents[] = javelin_render_tag( $contents[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -99,7 +99,7 @@ final class DifferentialChangesetTwoUpRenderer
: pht("\xE2\x96\xB2 Show 20 Lines")); : pht("\xE2\x96\xB2 Show 20 Lines"));
} }
$contents[] = javelin_render_tag( $contents[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -119,7 +119,7 @@ final class DifferentialChangesetTwoUpRenderer
} }
if ($len > 40) { if ($len > 40) {
$contents[] = javelin_render_tag( $contents[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -235,7 +235,7 @@ final class DifferentialChangesetTwoUpRenderer
dirname('/'.$orig_file); dirname('/'.$orig_file);
} }
$class = ($orig_type == '-' ? 'new-move' : 'new-copy'); $class = ($orig_type == '-' ? 'new-move' : 'new-copy');
$n_copy = javelin_render_tag( $n_copy = javelin_tag(
'td', 'td',
array( array(
'meta' => array( 'meta' => array(

View file

@ -104,7 +104,7 @@ final class DifferentialChangesetFileTreeSideNavBuilder {
), ),
$name); $name);
$filetree[] = javelin_render_tag( $filetree[] = javelin_tag(
$href ? 'a' : 'span', $href ? 'a' : 'span',
array( array(
'href' => $href, 'href' => $href,
@ -112,7 +112,7 @@ final class DifferentialChangesetFileTreeSideNavBuilder {
'title' => $title, 'title' => $title,
'class' => 'phabricator-filetree-item', 'class' => 'phabricator-filetree-item',
), ),
$icon.$name_element); array($icon, $name_element));
} }
$tree->destroy(); $tree->destroy();

View file

@ -143,7 +143,7 @@ final class DifferentialChangesetListView extends AphrontView {
$load = 'Loading...'; $load = 'Loading...';
$mapping[$uniq_id] = $ref; $mapping[$uniq_id] = $ref;
} else { } else {
$load = javelin_render_tag( $load = javelin_tag(
'a', 'a',
array( array(
'href' => '#'.$uniq_id, 'href' => '#'.$uniq_id,
@ -155,7 +155,7 @@ final class DifferentialChangesetListView extends AphrontView {
'sigil' => 'differential-load', 'sigil' => 'differential-load',
'mustcapture' => true, 'mustcapture' => true,
), ),
'Load'); pht('Load'));
} }
$detail->appendChild( $detail->appendChild(
phutil_tag( phutil_tag(
@ -209,13 +209,13 @@ final class DifferentialChangesetListView extends AphrontView {
* Render the "Undo" markup for the inline comment undo feature. * Render the "Undo" markup for the inline comment undo feature.
*/ */
private function renderUndoTemplates() { private function renderUndoTemplates() {
$link = javelin_render_tag( $link = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
'sigil' => 'differential-inline-comment-undo', 'sigil' => 'differential-inline-comment-undo',
), ),
'Undo'); pht('Undo'));
$div = phutil_tag( $div = phutil_tag(
'div', 'div',
@ -302,7 +302,7 @@ final class DifferentialChangesetListView extends AphrontView {
'differential-dropdown-menus', 'differential-dropdown-menus',
array()); array());
return javelin_render_tag( return javelin_tag(
'a', 'a',
array( array(
'class' => 'button small grey', 'class' => 'button small grey',
@ -311,7 +311,7 @@ final class DifferentialChangesetListView extends AphrontView {
'target' => '_blank', 'target' => '_blank',
'sigil' => 'differential-view-options', 'sigil' => 'differential-view-options',
), ),
"View Options \xE2\x96\xBC"); pht("View Options \xE2\x96\xBC"));
} }
} }

View file

@ -192,16 +192,14 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
} }
} }
$reveal_link = $reveal_link = javelin_tag(
javelin_render_tag(
'a', 'a',
array( array(
'sigil' => 'differential-reveal-all', 'sigil' => 'differential-reveal-all',
'mustcapture' => true, 'mustcapture' => true,
'class' => 'button differential-toc-reveal-all', 'class' => 'button differential-toc-reveal-all',
), ),
pht('Show All Context') pht('Show All Context'));
);
$buttons = $buttons =
'<tr><td colspan="7">'. '<tr><td colspan="7">'.
@ -256,7 +254,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
private function renderChangesetLink(DifferentialChangeset $changeset, $ref) { private function renderChangesetLink(DifferentialChangeset $changeset, $ref) {
$display_file = $changeset->getDisplayFilename(); $display_file = $changeset->getDisplayFilename();
return javelin_render_tag( return javelin_tag(
'a', 'a',
array( array(
'href' => '#'.$changeset->getAnchorName(), 'href' => '#'.$changeset->getAnchorName(),
@ -266,7 +264,7 @@ final class DifferentialDiffTableOfContentsView extends AphrontView {
), ),
'sigil' => 'differential-load', 'sigil' => 'differential-load',
), ),
phutil_escape_html($display_file)); $display_file);
} }
} }

View file

@ -94,7 +94,7 @@ final class DifferentialInlineCommentEditView extends AphrontView {
$buttons = array(); $buttons = array();
$buttons[] = '<button>Ready</button>'; $buttons[] = '<button>Ready</button>';
$buttons[] = javelin_render_tag( $buttons[] = javelin_tag(
'button', 'button',
array( array(
'sigil' => 'inline-edit-cancel', 'sigil' => 'inline-edit-cancel',

View file

@ -95,7 +95,7 @@ final class DifferentialInlineCommentView extends AphrontView {
} }
if (!$this->preview) { if (!$this->preview) {
$links[] = javelin_render_tag( $links[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -104,7 +104,7 @@ final class DifferentialInlineCommentView extends AphrontView {
), ),
pht('Previous')); pht('Previous'));
$links[] = javelin_render_tag( $links[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -122,7 +122,7 @@ final class DifferentialInlineCommentView extends AphrontView {
// file/line information, and synthetic comments don't have an inline // file/line information, and synthetic comments don't have an inline
// comment ID. // comment ID.
$links[] = javelin_render_tag( $links[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -138,7 +138,7 @@ final class DifferentialInlineCommentView extends AphrontView {
$anchor_name = 'inline-'.$inline->getID(); $anchor_name = 'inline-'.$inline->getID();
if ($this->editable && !$this->preview) { if ($this->editable && !$this->preview) {
$links[] = javelin_render_tag( $links[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -146,7 +146,7 @@ final class DifferentialInlineCommentView extends AphrontView {
'sigil' => 'differential-inline-edit', 'sigil' => 'differential-inline-edit',
), ),
pht('Edit')); pht('Edit'));
$links[] = javelin_render_tag( $links[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -155,7 +155,7 @@ final class DifferentialInlineCommentView extends AphrontView {
), ),
pht('Delete')); pht('Delete'));
} else if ($this->preview) { } else if ($this->preview) {
$links[] = javelin_render_tag( $links[] = javelin_tag(
'a', 'a',
array( array(
'meta' => array( 'meta' => array(
@ -164,7 +164,7 @@ final class DifferentialInlineCommentView extends AphrontView {
'sigil' => 'differential-inline-preview-jump', 'sigil' => 'differential-inline-preview-jump',
), ),
pht('Not Visible')); pht('Not Visible'));
$links[] = javelin_render_tag( $links[] = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',

View file

@ -166,7 +166,7 @@ final class DifferentialRevisionCommentListView extends AphrontView {
), ),
'<div class="differential-older-comments-are-hidden">'. '<div class="differential-older-comments-are-hidden">'.
pht('%d older comments are hidden. ', number_format(count($hidden))). pht('%d older comments are hidden. ', number_format(count($hidden))).
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',

View file

@ -111,7 +111,7 @@ final class DifferentialRevisionListView extends AphrontView {
if (isset($flagged[$phid])) { if (isset($flagged[$phid])) {
$class = PhabricatorFlagColor::getCSSClass($flagged[$phid]->getColor()); $class = PhabricatorFlagColor::getCSSClass($flagged[$phid]->getColor());
$note = $flagged[$phid]->getNote(); $note = $flagged[$phid]->getNote();
$flag = javelin_render_tag( $flag = javelin_tag(
'div', 'div',
$note ? array( $note ? array(
'class' => 'phabricator-flag-icon '.$class, 'class' => 'phabricator-flag-icon '.$class,

View file

@ -72,7 +72,7 @@ final class DifferentialRevisionUpdateHistoryView extends AphrontView {
if ($id) { if ($id) {
$new_checked = ($this->selectedDiffID == $id); $new_checked = ($this->selectedDiffID == $id);
$new = javelin_render_tag( $new = javelin_tag(
'input', 'input',
array( array(
'type' => 'radio', 'type' => 'radio',

View file

@ -605,7 +605,7 @@ final class DiffusionBrowseFileController extends DiffusionController {
Javelin::initBehavior('phabricator-tooltips', array()); Javelin::initBehavior('phabricator-tooltips', array());
require_celerity_resource('aphront-tooltip-css'); require_celerity_resource('aphront-tooltip-css');
$commit_link = javelin_render_tag( $commit_link = javelin_tag(
'a', 'a',
array( array(
'href' => $drequest->generateURI( 'href' => $drequest->generateURI(
@ -620,7 +620,7 @@ final class DiffusionBrowseFileController extends DiffusionController {
'size' => 600, 'size' => 600,
), ),
), ),
phutil_escape_html(phutil_utf8_shorten($line['commit'], 9, ''))); phutil_utf8_shorten($line['commit'], 9, ''));
$revision_id = null; $revision_id = null;
if (idx($commits, $commit)) { if (idx($commits, $commit)) {
@ -637,7 +637,7 @@ final class DiffusionBrowseFileController extends DiffusionController {
" \xC2\xB7 ". " \xC2\xB7 ".
$revision->getTitle(); $revision->getTitle();
} }
$revision_link = javelin_render_tag( $revision_link = javelin_tag(
'a', 'a',
array( array(
'href' => '/D'.$revision_id, 'href' => '/D'.$revision_id,
@ -652,7 +652,7 @@ final class DiffusionBrowseFileController extends DiffusionController {
} }
$uri = $line_href->alter('before', $commit); $uri = $line_href->alter('before', $commit);
$before_link = javelin_render_tag( $before_link = javelin_tag(
'a', 'a',
array( array(
'href' => $uri->setQueryParam('view', 'blame'), 'href' => $uri->setQueryParam('view', 'blame'),
@ -706,7 +706,7 @@ final class DiffusionBrowseFileController extends DiffusionController {
), ),
$line['line']); $line['line']);
$blame[] = javelin_render_tag( $blame[] = javelin_tag(
'th', 'th',
array( array(
'class' => 'diffusion-line-link', 'class' => 'diffusion-line-link',

View file

@ -62,15 +62,15 @@ final class DiffusionCommitEditController extends DiffusionController {
->setValue($proj_t_values) ->setValue($proj_t_values)
->setID($tokenizer_id) ->setID($tokenizer_id)
->setCaption( ->setCaption(
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => '/project/create/', 'href' => '/project/create/',
'mustcapture' => true, 'mustcapture' => true,
'sigil' => 'project-create', 'sigil' => 'project-create',
), ),
'Create New Project')) pht('Create New Project')))
->setDatasource('/typeahead/common/projects/'));; ->setDatasource('/typeahead/common/projects/'));;
Javelin::initBehavior('project-create', array( Javelin::initBehavior('project-create', array(
'tokenizerID' => $tokenizer_id, 'tokenizerID' => $tokenizer_id,

View file

@ -39,7 +39,7 @@ final class DiffusionCommitChangeTableView extends DiffusionView {
} }
if (isset($this->renderingReferences[$id])) { if (isset($this->renderingReferences[$id])) {
$path_column = javelin_render_tag( $path_column = javelin_tag(
'a', 'a',
array( array(
'href' => '#'.$hash, 'href' => '#'.$hash,
@ -49,7 +49,7 @@ final class DiffusionCommitChangeTableView extends DiffusionView {
), ),
'sigil' => 'differential-load', 'sigil' => 'differential-load',
), ),
phutil_escape_html($path)); $path);
} else { } else {
$path_column = phutil_escape_html($path); $path_column = phutil_escape_html($path);
} }

View file

@ -312,7 +312,7 @@ final class DiffusionHistoryTableView extends DiffusionView {
// Render into tags for the behavior. // Render into tags for the behavior.
foreach ($graph as $k => $meta) { foreach ($graph as $k => $meta) {
$graph[$k] = javelin_render_tag( $graph[$k] = javelin_tag(
'div', 'div',
array( array(
'sigil' => 'commit-graph', 'sigil' => 'commit-graph',

View file

@ -144,7 +144,7 @@ abstract class DiffusionView extends AphrontView {
if ($email->getDisplayName() && $email->getDomainName()) { if ($email->getDisplayName() && $email->getDomainName()) {
Javelin::initBehavior('phabricator-tooltips', array()); Javelin::initBehavior('phabricator-tooltips', array());
require_celerity_resource('aphront-tooltip-css'); require_celerity_resource('aphront-tooltip-css');
return javelin_render_tag( return javelin_tag(
'span', 'span',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
@ -154,7 +154,7 @@ abstract class DiffusionView extends AphrontView {
'size' => 'auto', 'size' => 'auto',
), ),
), ),
phutil_escape_html($email->getDisplayName())); $email->getDisplayName());
} }
return phutil_escape_html($name); return phutil_escape_html($name);
} }

View file

@ -100,7 +100,7 @@ final class HeraldRuleController extends HeraldController {
->appendChild( ->appendChild(
// Build this explicitly (instead of using addHiddenInput()) // Build this explicitly (instead of using addHiddenInput())
// so we can add a sigil to it. // so we can add a sigil to it.
javelin_render_tag( javelin_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',
@ -123,7 +123,7 @@ final class HeraldRuleController extends HeraldController {
->appendChild( ->appendChild(
id(new AphrontFormInsetView()) id(new AphrontFormInsetView())
->setTitle('Conditions') ->setTitle('Conditions')
->setRightButton(javelin_render_tag( ->setRightButton(javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -135,7 +135,7 @@ final class HeraldRuleController extends HeraldController {
->setDescription( ->setDescription(
'When '.$must_match_selector . 'When '.$must_match_selector .
' these conditions are met:') ' these conditions are met:')
->setContent(javelin_render_tag( ->setContent(javelin_tag(
'table', 'table',
array( array(
'sigil' => 'rule-conditions', 'sigil' => 'rule-conditions',
@ -145,7 +145,7 @@ final class HeraldRuleController extends HeraldController {
->appendChild( ->appendChild(
id(new AphrontFormInsetView()) id(new AphrontFormInsetView())
->setTitle('Action') ->setTitle('Action')
->setRightButton(javelin_render_tag( ->setRightButton(javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -156,7 +156,7 @@ final class HeraldRuleController extends HeraldController {
'Create New Action')) 'Create New Action'))
->setDescription('Take these actions '.$repetition_selector. ->setDescription('Take these actions '.$repetition_selector.
' this rule matches:') ' this rule matches:')
->setContent(javelin_render_tag( ->setContent(javelin_tag(
'table', 'table',
array( array(
'sigil' => 'rule-actions', 'sigil' => 'rule-actions',

View file

@ -58,7 +58,7 @@ final class HeraldRuleListView extends AphrontView {
), ),
'View Edit Log'); 'View Edit Log');
$delete = javelin_render_tag( $delete = javelin_tag(
'a', 'a',
array( array(
'href' => '/herald/delete/'.$rule->getID().'/', 'href' => '/herald/delete/'.$rule->getID().'/',

View file

@ -101,7 +101,7 @@ final class ManiphestBatchEditController extends ManiphestController {
$form->appendChild( $form->appendChild(
id(new AphrontFormInsetView()) id(new AphrontFormInsetView())
->setTitle('Actions') ->setTitle('Actions')
->setRightButton(javelin_render_tag( ->setRightButton(javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -110,7 +110,7 @@ final class ManiphestBatchEditController extends ManiphestController {
'mustcapture' => true, 'mustcapture' => true,
), ),
'Add Another Action')) 'Add Another Action'))
->setContent(javelin_render_tag( ->setContent(javelin_tag(
'table', 'table',
array( array(
'sigil' => 'maniphest-batch-actions', 'sigil' => 'maniphest-batch-actions',

View file

@ -574,7 +574,7 @@ final class ManiphestReportController extends ManiphestController {
} }
$cname[] = 'Total'; $cname[] = 'Total';
$cclass[] = 'n'; $cclass[] = 'n';
$cname[] = javelin_render_tag( $cname[] = javelin_tag(
'span', 'span',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
@ -585,7 +585,7 @@ final class ManiphestReportController extends ManiphestController {
), ),
'Oldest (All)'); 'Oldest (All)');
$cclass[] = 'n'; $cclass[] = 'n';
$cname[] = javelin_render_tag( $cname[] = javelin_tag(
'span', 'span',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
@ -599,7 +599,7 @@ final class ManiphestReportController extends ManiphestController {
$cclass[] = 'n'; $cclass[] = 'n';
list($ignored, $window_epoch) = $this->getWindow(); list($ignored, $window_epoch) = $this->getWindow();
$cname[] = javelin_render_tag( $cname[] = javelin_tag(
'span', 'span',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
@ -745,7 +745,7 @@ final class ManiphestReportController extends ManiphestController {
$raw_age = (time() - $oldest->getDateCreated()); $raw_age = (time() - $oldest->getDateCreated());
$age = number_format($raw_age / (24 * 60 * 60)).' d'; $age = number_format($raw_age / (24 * 60 * 60)).' d';
$link = javelin_render_tag( $link = javelin_tag(
'a', 'a',
array( array(
'href' => '/T'.$oldest->getID(), 'href' => '/T'.$oldest->getID(),
@ -755,7 +755,7 @@ final class ManiphestReportController extends ManiphestController {
), ),
'target' => '_blank', 'target' => '_blank',
), ),
phutil_escape_html($age)); $age);
return array($link, $raw_age); return array($link, $raw_age);
} }

View file

@ -61,7 +61,7 @@ final class ManiphestSavedQueryListController extends ManiphestController {
'class' => 'grey small button', 'class' => 'grey small button',
), ),
'Edit'), 'Edit'),
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => '/maniphest/custom/delete/'.$query->getID().'/', 'href' => '/maniphest/custom/delete/'.$query->getID().'/',

View file

@ -425,7 +425,7 @@ final class ManiphestTaskEditController extends ManiphestController {
->setValue($projects_value) ->setValue($projects_value)
->setID($project_tokenizer_id) ->setID($project_tokenizer_id)
->setCaption( ->setCaption(
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => '/project/create/', 'href' => '/project/create/',

View file

@ -641,7 +641,7 @@ final class ManiphestTaskListController extends ManiphestController {
'status' => 'batch-select-status-cell', 'status' => 'batch-select-status-cell',
)); ));
$select_all = javelin_render_tag( $select_all = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -651,7 +651,7 @@ final class ManiphestTaskListController extends ManiphestController {
), ),
'Select All'); 'Select All');
$select_none = javelin_render_tag( $select_none = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -670,7 +670,7 @@ final class ManiphestTaskListController extends ManiphestController {
), ),
"Batch Edit Selected Tasks \xC2\xBB"); "Batch Edit Selected Tasks \xC2\xBB");
$export = javelin_render_tag( $export = javelin_tag(
'a', 'a',
array( array(
'href' => '/maniphest/export/'.$search_query->getQueryKey().'/', 'href' => '/maniphest/export/'.$search_query->getQueryKey().'/',

View file

@ -27,7 +27,7 @@ final class ManiphestTaskProjectsView extends ManiphestView {
'href' => $handle->getURI(), 'href' => $handle->getURI(),
'class' => 'phabricator-project-tag', 'class' => 'phabricator-project-tag',
), ),
phutil_utf8_shorten($handle->getName(), 24)); phutil_utf8_shorten($handle->getName(), 24));
} }
if (count($this->handles) > 2) { if (count($this->handles) > 2) {
@ -39,7 +39,7 @@ final class ManiphestTaskProjectsView extends ManiphestView {
$all[] = $handle->getName(); $all[] = $handle->getName();
} }
$tags[] = javelin_render_tag( $tags[] = javelin_tag(
'span', 'span',
array( array(
'class' => 'phabricator-project-tag', 'class' => 'phabricator-project-tag',

View file

@ -62,15 +62,14 @@ final class ManiphestTaskSummaryView extends ManiphestView {
if ($this->showBatchControls) { if ($this->showBatchControls) {
$batch = $batch =
'<td class="maniphest-task-batch">'. '<td class="maniphest-task-batch">'.
javelin_render_tag( javelin_tag(
'input', 'input',
array( array(
'type' => 'checkbox', 'type' => 'checkbox',
'name' => 'batch[]', 'name' => 'batch[]',
'value' => $task->getID(), 'value' => $task->getID(),
'sigil' => 'maniphest-batch', 'sigil' => 'maniphest-batch',
), )).
null).
'</td>'; '</td>';
} }
@ -87,7 +86,7 @@ final class ManiphestTaskSummaryView extends ManiphestView {
$control_sigil = 'maniphest-task-handle'; $control_sigil = 'maniphest-task-handle';
} }
$handle = javelin_render_tag( $handle = javelin_tag(
'td', 'td',
array( array(
'class' => 'maniphest-task-handle '.$pri_class.' '.$control_class, 'class' => 'maniphest-task-handle '.$pri_class.' '.$control_class,

View file

@ -590,7 +590,7 @@ final class ManiphestTransactionDetailView extends ManiphestView {
Javelin::initBehavior('maniphest-transaction-expand'); Javelin::initBehavior('maniphest-transaction-expand');
return javelin_render_tag( return javelin_tag(
'a', 'a',
array( array(
'href' => '/maniphest/task/descriptionchange/'.$id.'/', 'href' => '/maniphest/task/descriptionchange/'.$id.'/',

View file

@ -61,7 +61,7 @@ final class PhabricatorNotificationListController
$panel->setHeader($header); $panel->setHeader($header);
$panel->setWidth(AphrontPanelView::WIDTH_FORM); $panel->setWidth(AphrontPanelView::WIDTH_FORM);
$panel->addButton( $panel->addButton(
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => '/notification/clear/', 'href' => '/notification/clear/',

View file

@ -120,7 +120,7 @@ final class PhabricatorOwnersDetailController
$panel->setHeader( $panel->setHeader(
'Package Details for "'.phutil_escape_html($package->getName()).'"'); 'Package Details for "'.phutil_escape_html($package->getName()).'"');
$panel->addButton( $panel->addButton(
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => '/owners/delete/'.$package->getID().'/', 'href' => '/owners/delete/'.$package->getID().'/',

View file

@ -218,7 +218,7 @@ final class PhabricatorOwnersEditController
id(new AphrontFormInsetView()) id(new AphrontFormInsetView())
->setTitle('Paths') ->setTitle('Paths')
->addDivAttributes(array('id' => 'path-editor')) ->addDivAttributes(array('id' => 'path-editor'))
->setRightButton(javelin_render_tag( ->setRightButton(javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',
@ -229,7 +229,7 @@ final class PhabricatorOwnersEditController
'Add New Path')) 'Add New Path'))
->setDescription('Specify the files and directories which comprise '. ->setDescription('Specify the files and directories which comprise '.
'this package.') 'this package.')
->setContent(javelin_render_tag( ->setContent(javelin_tag(
'table', 'table',
array( array(
'class' => 'owners-path-editor-table', 'class' => 'owners-path-editor-table',

View file

@ -51,7 +51,7 @@ final class PhortuneStripePaymentFormView extends AphrontView {
id(new AphrontFormMarkupControl()) id(new AphrontFormMarkupControl())
->setLabel('') ->setLabel('')
->setValue( ->setValue(
javelin_render_tag( javelin_tag(
'div', 'div',
array( array(
'class' => 'credit-card-logos', 'class' => 'credit-card-logos',
@ -86,7 +86,7 @@ final class PhortuneStripePaymentFormView extends AphrontView {
->setError($this->getCardExpirationError()) ->setError($this->getCardExpirationError())
) )
->appendChild( ->appendChild(
javelin_render_tag( javelin_tag(
'input', 'input',
array( array(
'hidden' => true, 'hidden' => true,
@ -96,7 +96,7 @@ final class PhortuneStripePaymentFormView extends AphrontView {
) )
) )
->appendChild( ->appendChild(
javelin_render_tag( javelin_tag(
'input', 'input',
array( array(
'hidden' => true, 'hidden' => true,

View file

@ -35,7 +35,7 @@ final class PonderVotableView extends AphrontView {
$uri = id(new PhutilURI($this->uri))->alter('phid', $this->phid); $uri = id(new PhutilURI($this->uri))->alter('phid', $this->phid);
$up = javelin_render_tag( $up = javelin_tag(
'a', 'a',
array( array(
'href' => (string)$uri, 'href' => (string)$uri,
@ -45,7 +45,7 @@ final class PonderVotableView extends AphrontView {
), ),
"\xE2\x96\xB2"); "\xE2\x96\xB2");
$down = javelin_render_tag( $down = javelin_tag(
'a', 'a',
array( array(
'href' => (string)$uri, 'href' => (string)$uri,
@ -55,13 +55,13 @@ final class PonderVotableView extends AphrontView {
), ),
"\xE2\x96\xBC"); "\xE2\x96\xBC");
$count = javelin_render_tag( $count = javelin_tag(
'div', 'div',
array( array(
'class' => 'ponder-vote-count', 'class' => 'ponder-vote-count',
'sigil' => 'ponder-vote-count', 'sigil' => 'ponder-vote-count',
), ),
phutil_escape_html($this->count)); $this->count);
return javelin_render_tag( return javelin_render_tag(
'div', 'div',

View file

@ -142,7 +142,7 @@ final class PhabricatorProjectMembersEditController
), ),
''); '');
$button = javelin_render_tag( $button = javelin_tag(
'button', 'button',
array( array(
'class' => 'grey', 'class' => 'grey',

View file

@ -98,7 +98,7 @@ final class PhabricatorProjectProfileController
), ),
'Join Project')); 'Join Project'));
} else { } else {
$action = javelin_render_tag( $action = javelin_tag(
'a', 'a',
array( array(
'href' => '/project/update/'.$project->getID().'/leave/', 'href' => '/project/update/'.$project->getID().'/leave/',

View file

@ -43,7 +43,7 @@ final class PhabricatorRepositoryListController
'href' => '/repository/edit/'.$repo->getID().'/', 'href' => '/repository/edit/'.$repo->getID().'/',
), ),
'Edit'), 'Edit'),
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'class' => 'button small grey', 'class' => 'button small grey',

View file

@ -52,7 +52,7 @@ final class PhabricatorSettingsPanelEmailAddresses
$rows = array(); $rows = array();
foreach ($emails as $email) { foreach ($emails as $email) {
$button_verify = javelin_render_tag( $button_verify = javelin_tag(
'a', 'a',
array( array(
'class' => 'button small grey', 'class' => 'button small grey',
@ -61,7 +61,7 @@ final class PhabricatorSettingsPanelEmailAddresses
), ),
'Verify'); 'Verify');
$button_make_primary = javelin_render_tag( $button_make_primary = javelin_tag(
'a', 'a',
array( array(
'class' => 'button small grey', 'class' => 'button small grey',
@ -70,7 +70,7 @@ final class PhabricatorSettingsPanelEmailAddresses
), ),
'Make Primary'); 'Make Primary');
$button_remove = javelin_render_tag( $button_remove = javelin_tag(
'a', 'a',
array( array(
'class' => 'button small grey', 'class' => 'button small grey',
@ -133,7 +133,7 @@ final class PhabricatorSettingsPanelEmailAddresses
$view = new AphrontPanelView(); $view = new AphrontPanelView();
if ($editable) { if ($editable) {
$view->addButton( $view->addButton(
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => $uri->alter('new', 'true'), 'href' => $uri->alter('new', 'true'),

View file

@ -186,7 +186,7 @@ final class PhabricatorSettingsPanelSSHKeys
phutil_escape_html($key->getKeyType()), phutil_escape_html($key->getKeyType()),
phabricator_date($key->getDateCreated(), $user), phabricator_date($key->getDateCreated(), $user),
phabricator_time($key->getDateCreated(), $user), phabricator_time($key->getDateCreated(), $user),
javelin_render_tag( javelin_tag(
'a', 'a',
array( array(
'href' => $this->getPanelURI('?delete='.$key->getID()), 'href' => $this->getPanelURI('?delete='.$key->getID()),

View file

@ -20,7 +20,7 @@ final class JavelinUIExample extends PhabricatorUIExample {
$button_red_id = celerity_generate_unique_node_id(); $button_red_id = celerity_generate_unique_node_id();
$button_blue_id = celerity_generate_unique_node_id(); $button_blue_id = celerity_generate_unique_node_id();
$button_red = javelin_render_tag( $button_red = javelin_tag(
'a', 'a',
array( array(
'class' => 'button', 'class' => 'button',
@ -36,7 +36,7 @@ final class JavelinUIExample extends PhabricatorUIExample {
), ),
'Toggle Red Border'); 'Toggle Red Border');
$button_blue = javelin_render_tag( $button_blue = javelin_tag(
'a', 'a',
array( array(
'class' => 'button jxui-active', 'class' => 'button jxui-active',

View file

@ -15,7 +15,7 @@ final class PhabricatorUINotificationExample extends PhabricatorUIExample {
require_celerity_resource('phabricator-notification-css'); require_celerity_resource('phabricator-notification-css');
Javelin::initBehavior('phabricator-notification-example'); Javelin::initBehavior('phabricator-notification-example');
$content = javelin_render_tag( $content = javelin_tag(
'a', 'a',
array( array(
'sigil' => 'notification-example', 'sigil' => 'notification-example',

View file

@ -89,14 +89,14 @@ EOTEXT;
$content = array(); $content = array();
foreach ($metas as $key => $meta) { foreach ($metas as $key => $meta) {
$content[] = javelin_render_tag( $content[] = javelin_tag(
'div', 'div',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
'meta' => $meta, 'meta' => $meta,
'style' => $style, 'style' => $style,
), ),
phutil_escape_html($key)); $key);
} }
return $content; return $content;

View file

@ -84,7 +84,7 @@ final class PhabricatorXHProfProfileTopLevelView
array( array(
'Symbol', 'Symbol',
'Count', 'Count',
javelin_render_tag( javelin_tag(
'span', 'span',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
@ -97,7 +97,7 @@ final class PhabricatorXHProfProfileTopLevelView
), ),
'Wall Time (Inclusive)'), 'Wall Time (Inclusive)'),
'%', '%',
javelin_render_tag( javelin_tag(
'span', 'span',
array( array(
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',

View file

@ -234,14 +234,14 @@ abstract class PhabricatorInlineCommentController
} }
private function renderTextArea($text) { private function renderTextArea($text) {
return javelin_render_tag( return javelin_tag(
'textarea', 'textarea',
array( array(
'class' => 'differential-inline-comment-edit-textarea', 'class' => 'differential-inline-comment-edit-textarea',
'sigil' => 'differential-inline-comment-edit-textarea', 'sigil' => 'differential-inline-comment-edit-textarea',
'name' => 'text', 'name' => 'text',
), ),
phutil_escape_html($text)); $text);
} }
} }

View file

@ -5,6 +5,19 @@ function javelin_render_tag(
array $attributes = array(), array $attributes = array(),
$content = null) { $content = null) {
if (is_array($content)) {
$content = implode('', $content);
}
$html = javelin_tag($tag, $attributes, phutil_safe_html($content));
return $html->getHTMLContent();
}
function javelin_tag(
$tag,
array $attributes = array(),
$content = null) {
if (isset($attributes['sigil']) || if (isset($attributes['sigil']) ||
isset($attributes['meta']) || isset($attributes['meta']) ||
isset($attributes['mustcapture'])) { isset($attributes['mustcapture'])) {
@ -32,10 +45,9 @@ function javelin_render_tag(
} }
} }
return phutil_render_tag($tag, $attributes, $content); return phutil_tag($tag, $attributes, $content);
} }
function phabricator_render_form(PhabricatorUser $user, $attributes, $content) { function phabricator_render_form(PhabricatorUser $user, $attributes, $content) {
if (strcasecmp(idx($attributes, 'method'), 'POST') == 0 && if (strcasecmp(idx($attributes, 'method'), 'POST') == 0 &&
!preg_match('#^(https?:|//)#', idx($attributes, 'action'))) { !preg_match('#^(https?:|//)#', idx($attributes, 'action'))) {

View file

@ -52,13 +52,13 @@ final class PhabricatorRemarkupRuleCountdown extends PhutilRemarkupRule {
'id' => $id, 'id' => $id,
), ),
array( array(
javelin_render_tag('span', javelin_tag('span',
array('sigil' => 'phabricator-timer-days'), '').'d', array('sigil' => 'phabricator-timer-days'), '').'d',
javelin_render_tag('span', javelin_tag('span',
array('sigil' => 'phabricator-timer-hours'), '').'h', array('sigil' => 'phabricator-timer-hours'), '').'h',
javelin_render_tag('span', javelin_tag('span',
array('sigil' => 'phabricator-timer-minutes'), '').'m', array('sigil' => 'phabricator-timer-minutes'), '').'m',
javelin_render_tag('span', javelin_tag('span',
array('sigil' => 'phabricator-timer-seconds'), '').'s', array('sigil' => 'phabricator-timer-seconds'), '').'s',
)); ));
Javelin::initBehavior('countdown-timer', array( Javelin::initBehavior('countdown-timer', array(

View file

@ -110,7 +110,7 @@ final class PhabricatorRemarkupRuleEmbedFile
require_celerity_resource('lightbox-attachment-css'); require_celerity_resource('lightbox-attachment-css');
$img = phutil_tag('img', $data['attrs']); $img = phutil_tag('img', $data['attrs']);
$embed = javelin_render_tag( $embed = javelin_tag(
'a', 'a',
array( array(
'href' => $meta['uri'], 'href' => $meta['uri'],

View file

@ -79,17 +79,17 @@ final class AphrontDialogView extends AphrontView {
$buttons = array(); $buttons = array();
if ($this->submitButton) { if ($this->submitButton) {
$buttons[] = javelin_render_tag( $buttons[] = javelin_tag(
'button', 'button',
array( array(
'name' => '__submit__', 'name' => '__submit__',
'sigil' => '__default__', 'sigil' => '__default__',
), ),
phutil_escape_html($this->submitButton)); $this->submitButton);
} }
if ($this->cancelURI) { if ($this->cancelURI) {
$buttons[] = javelin_render_tag( $buttons[] = javelin_tag(
'a', 'a',
array( array(
'href' => $this->cancelURI, 'href' => $this->cancelURI,
@ -97,7 +97,7 @@ final class AphrontDialogView extends AphrontView {
'name' => '__cancel__', 'name' => '__cancel__',
'sigil' => 'jx-workflow-button', 'sigil' => 'jx-workflow-button',
), ),
phutil_escape_html($this->cancelText)); $this->cancelText);
} }
$buttons = implode('', $buttons); $buttons = implode('', $buttons);
@ -133,7 +133,7 @@ final class AphrontDialogView extends AphrontView {
$hidden_inputs = array(); $hidden_inputs = array();
foreach ($this->hidden as $desc) { foreach ($this->hidden as $desc) {
list($key, $value) = $desc; list($key, $value) = $desc;
$hidden_inputs[] = javelin_render_tag( $hidden_inputs[] = javelin_tag(
'input', 'input',
array( array(
'type' => 'hidden', 'type' => 'hidden',

View file

@ -32,7 +32,7 @@ final class AphrontAttachedFileView extends AphrontView {
$file->getName()); $file->getName());
$size = number_format($file->getByteSize()).' bytes'; $size = number_format($file->getByteSize()).' bytes';
$remove = javelin_render_tag( $remove = javelin_tag(
'a', 'a',
array( array(
'class' => 'button grey', 'class' => 'button grey',

View file

@ -41,7 +41,7 @@ final class AphrontTokenizerTemplateView extends AphrontView {
$tokens[] = $this->renderToken($key, $value); $tokens[] = $this->renderToken($key, $value);
} }
$input = javelin_render_tag( $input = javelin_tag(
'input', 'input',
array( array(
'mustcapture' => true, 'mustcapture' => true,

View file

@ -41,7 +41,7 @@ final class AphrontTypeaheadTemplateView extends AphrontView {
$tokens[] = $this->renderToken($key, $value); $tokens[] = $this->renderToken($key, $value);
} }
$input = javelin_render_tag( $input = javelin_tag(
'input', 'input',
array( array(
'name' => $name, 'name' => $name,
@ -52,14 +52,16 @@ final class AphrontTypeaheadTemplateView extends AphrontView {
'autocomplete' => 'off', 'autocomplete' => 'off',
)); ));
return javelin_render_tag( return javelin_tag(
'div', 'div',
array( array(
'id' => $id, 'id' => $id,
'sigil' => 'typeahead-hardpoint', 'sigil' => 'typeahead-hardpoint',
'class' => 'jx-typeahead-hardpoint', 'class' => 'jx-typeahead-hardpoint',
), ),
$input. array(
'<div style="clear: both;"></div>'); $input,
phutil_tag('div', array('style' => 'clear: both'), ''),
));
} }
} }

View file

@ -225,7 +225,7 @@ final class AphrontFormDateControl extends AphrontFormControl {
'sigil' => 'year-input', 'sigil' => 'year-input',
)); ));
$cal_icon = javelin_render_tag( $cal_icon = javelin_tag(
'a', 'a',
array( array(
'href' => '#', 'href' => '#',

View file

@ -25,7 +25,7 @@ final class AphrontFormTextControl extends AphrontFormControl {
} }
protected function renderInput() { protected function renderInput() {
return javelin_render_tag( return javelin_tag(
'input', 'input',
array( array(
'type' => 'text', 'type' => 'text',

View file

@ -99,7 +99,7 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl {
require_celerity_resource('sprite-icon-css'); require_celerity_resource('sprite-icon-css');
$buttons[] = javelin_render_tag( $buttons[] = javelin_tag(
'a', 'a',
array( array(
'class' => implode(' ', $classes), 'class' => implode(' ', $classes),

View file

@ -32,7 +32,7 @@ final class AphrontMoreView extends AphrontView {
$link = null; $link = null;
if ($this->more && $this->more != $this->some) { if ($this->more && $this->more != $this->some) {
Javelin::initBehavior('aphront-more'); Javelin::initBehavior('aphront-more');
$link = ' '.javelin_render_tag( $link = ' '.javelin_tag(
'a', 'a',
array( array(
'sigil' => 'aphront-more-view-show-more', 'sigil' => 'aphront-more-view-show-more',

View file

@ -66,12 +66,12 @@ final class PhabricatorActionView extends AphrontView {
'Call setUser() when rendering an action as a form.'); 'Call setUser() when rendering an action as a form.');
} }
$item = javelin_render_tag( $item = javelin_tag(
'button', 'button',
array( array(
'class' => 'phabricator-action-view-item', 'class' => 'phabricator-action-view-item',
), ),
phutil_escape_html($this->name)); $this->name);
$item = phabricator_render_form( $item = phabricator_render_form(
$this->user, $this->user,
@ -82,14 +82,14 @@ final class PhabricatorActionView extends AphrontView {
), ),
$item); $item);
} else { } else {
$item = javelin_render_tag( $item = javelin_tag(
'a', 'a',
array( array(
'href' => $this->href, 'href' => $this->href,
'class' => 'phabricator-action-view-item', 'class' => 'phabricator-action-view-item',
'sigil' => $this->workflow ? 'workflow' : null, 'sigil' => $this->workflow ? 'workflow' : null,
), ),
phutil_escape_html($this->name)); $this->name);
} }
} else { } else {
$item = phutil_tag( $item = phutil_tag(

View file

@ -18,7 +18,7 @@ final class PhabricatorAnchorView extends AphrontView {
public function render() { public function render() {
$marker = null; $marker = null;
if ($this->navigationMarker) { if ($this->navigationMarker) {
$marker = javelin_render_tag( $marker = javelin_tag(
'legend', 'legend',
array( array(
'class' => 'phabricator-anchor-navigation-marker', 'class' => 'phabricator-anchor-navigation-marker',

View file

@ -37,14 +37,17 @@ final class PhabricatorCrumbsView extends AphrontView {
), ),
''); '');
} }
$actions[] = javelin_render_tag( $actions[] = javelin_tag(
'a', 'a',
array( array(
'href' => $action->getHref(), 'href' => $action->getHref(),
'class' => 'phabricator-crumbs-action', 'class' => 'phabricator-crumbs-action',
'sigil' => $action->getWorkflow() ? 'workflow' : null, 'sigil' => $action->getWorkflow() ? 'workflow' : null,
), ),
$icon.phutil_escape_html($action->getName())); array(
$icon,
$action->getName(),
));
} }
$action_view = phutil_render_tag( $action_view = phutil_render_tag(

View file

@ -67,7 +67,7 @@ final class PhabricatorFileLinkView extends AphrontView {
); );
} }
return javelin_render_tag( return javelin_tag(
'a', 'a',
array( array(
'href' => $this->getFileViewURI(), 'href' => $this->getFileViewURI(),
@ -76,7 +76,6 @@ final class PhabricatorFileLinkView extends AphrontView {
'meta' => $meta, 'meta' => $meta,
'mustcapture' => $mustcapture, 'mustcapture' => $mustcapture,
), ),
phutil_escape_html($this->getFileName()) $this->getFileName());
);
} }
} }

View file

@ -235,7 +235,7 @@ final class PhabricatorTimelineEventView extends AphrontView {
if ($this->getIsEdited()) { if ($this->getIsEdited()) {
$extra[] = javelin_render_tag( $extra[] = javelin_tag(
'a', 'a',
array( array(
'href' => '/transactions/history/'.$xaction_phid.'/', 'href' => '/transactions/history/'.$xaction_phid.'/',
@ -245,7 +245,7 @@ final class PhabricatorTimelineEventView extends AphrontView {
} }
if ($this->getIsEditable()) { if ($this->getIsEditable()) {
$extra[] = javelin_render_tag( $extra[] = javelin_tag(
'a', 'a',
array( array(
'href' => '/transactions/edit/'.$xaction_phid.'/', 'href' => '/transactions/edit/'.$xaction_phid.'/',

View file

@ -64,10 +64,10 @@ final class AphrontHeadsupActionView extends AphrontView {
$attrs['sigil'] = 'workflow'; $attrs['sigil'] = 'workflow';
} }
return javelin_render_tag( return javelin_tag(
$tag, $tag,
$attrs, $attrs,
phutil_escape_html($this->name)); $this->name);
} }
} }

View file

@ -65,15 +65,15 @@ final class PhabricatorMainMenuIconView extends AphrontView {
$classes = $this->classes; $classes = $this->classes;
$classes[] = 'phabricator-main-menu-icon'; $classes[] = 'phabricator-main-menu-icon';
$label = javelin_render_tag( $label = javelin_tag(
'a', 'a',
array( array(
'href' => $href, 'href' => $href,
'class' => 'phabricator-main-menu-icon-label', 'class' => 'phabricator-main-menu-icon-label',
), ),
phutil_escape_html($name)); $name);
$item = javelin_render_tag( $item = javelin_tag(
'a', 'a',
array( array(
'href' => $href, 'href' => $href,

View file

@ -34,7 +34,7 @@ final class PhabricatorMainMenuSearchView extends AphrontView {
$scope = $this->scope; $scope = $this->scope;
$target = javelin_render_tag( $target = javelin_tag(
'div', 'div',
array( array(
'id' => $target_id, 'id' => $target_id,

View file

@ -118,7 +118,7 @@ final class PhabricatorMainMenuView extends AphrontView {
} }
private function renderPhabricatorMenuButton($header_id) { private function renderPhabricatorMenuButton($header_id) {
return javelin_render_tag( return javelin_tag(
'a', 'a',
array( array(
'class' => 'phabricator-main-menu-expand-button '. 'class' => 'phabricator-main-menu-expand-button '.
@ -139,7 +139,7 @@ final class PhabricatorMainMenuView extends AphrontView {
} }
public function renderApplicationMenuButton($header_id) { public function renderApplicationMenuButton($header_id) {
return javelin_render_tag( return javelin_tag(
'a', 'a',
array( array(
'class' => 'phabricator-main-menu-expand-button '. 'class' => 'phabricator-main-menu-expand-button '.
@ -344,7 +344,7 @@ final class PhabricatorMainMenuView extends AphrontView {
'dropdownID' => $dropdown_id, 'dropdownID' => $dropdown_id,
)); ));
$notification_dropdown = javelin_render_tag( $notification_dropdown = javelin_tag(
'div', 'div',
array( array(
'id' => $dropdown_id, 'id' => $dropdown_id,