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

Use textContent instead of innerHTML for linking symbols

Summary: Go to https://secure.phabricator.com/D2646#59cc9d49 and click on `array_mergev` to repro.

Test Plan: Checked if the property exists in DOM inspector.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2742
This commit is contained in:
vrana 2012-06-13 14:24:25 -07:00
parent 4ac1fa1432
commit 0cdc4e008d
2 changed files with 23 additions and 22 deletions

View file

@ -1439,7 +1439,7 @@ celerity_register_resource_map(array(
), ),
'javelin-behavior-repository-crossreference' => 'javelin-behavior-repository-crossreference' =>
array( array(
'uri' => '/res/49472f48/rsrc/js/application/repository/repository-crossreference.js', 'uri' => '/res/8e4bbed2/rsrc/js/application/repository/repository-crossreference.js',
'type' => 'js', 'type' => 'js',
'requires' => 'requires' =>
array( array(
@ -2592,7 +2592,7 @@ celerity_register_resource_map(array(
'uri' => '/res/pkg/32f461a4/differential.pkg.css', 'uri' => '/res/pkg/32f461a4/differential.pkg.css',
'type' => 'css', 'type' => 'css',
), ),
'86f654e2' => '3590beb8' =>
array( array(
'name' => 'differential.pkg.js', 'name' => 'differential.pkg.js',
'symbols' => 'symbols' =>
@ -2616,7 +2616,7 @@ celerity_register_resource_map(array(
16 => 'javelin-behavior-differential-dropdown-menus', 16 => 'javelin-behavior-differential-dropdown-menus',
17 => 'javelin-behavior-buoyant', 17 => 'javelin-behavior-buoyant',
), ),
'uri' => '/res/pkg/86f654e2/differential.pkg.js', 'uri' => '/res/pkg/3590beb8/differential.pkg.js',
'type' => 'js', 'type' => 'js',
), ),
'c8ce2d88' => 'c8ce2d88' =>
@ -2724,7 +2724,7 @@ celerity_register_resource_map(array(
'aphront-typeahead-control-css' => '040e796f', 'aphront-typeahead-control-css' => '040e796f',
'differential-changeset-view-css' => '32f461a4', 'differential-changeset-view-css' => '32f461a4',
'differential-core-view-css' => '32f461a4', 'differential-core-view-css' => '32f461a4',
'differential-inline-comment-editor' => '86f654e2', 'differential-inline-comment-editor' => '3590beb8',
'differential-local-commits-view-css' => '32f461a4', 'differential-local-commits-view-css' => '32f461a4',
'differential-results-table-css' => '32f461a4', 'differential-results-table-css' => '32f461a4',
'differential-revision-add-comment-css' => '32f461a4', 'differential-revision-add-comment-css' => '32f461a4',
@ -2737,21 +2737,21 @@ celerity_register_resource_map(array(
'inline-comment-summary-css' => '32f461a4', 'inline-comment-summary-css' => '32f461a4',
'javelin-behavior' => '6fb20113', 'javelin-behavior' => '6fb20113',
'javelin-behavior-aphront-basic-tokenizer' => '97f65640', 'javelin-behavior-aphront-basic-tokenizer' => '97f65640',
'javelin-behavior-aphront-drag-and-drop' => '86f654e2', 'javelin-behavior-aphront-drag-and-drop' => '3590beb8',
'javelin-behavior-aphront-drag-and-drop-textarea' => '86f654e2', 'javelin-behavior-aphront-drag-and-drop-textarea' => '3590beb8',
'javelin-behavior-aphront-form-disable-on-submit' => '0c96375e', 'javelin-behavior-aphront-form-disable-on-submit' => '0c96375e',
'javelin-behavior-audit-preview' => '5e68be89', 'javelin-behavior-audit-preview' => '5e68be89',
'javelin-behavior-buoyant' => '86f654e2', 'javelin-behavior-buoyant' => '3590beb8',
'javelin-behavior-differential-accept-with-errors' => '86f654e2', 'javelin-behavior-differential-accept-with-errors' => '3590beb8',
'javelin-behavior-differential-add-reviewers-and-ccs' => '86f654e2', 'javelin-behavior-differential-add-reviewers-and-ccs' => '3590beb8',
'javelin-behavior-differential-comment-jump' => '86f654e2', 'javelin-behavior-differential-comment-jump' => '3590beb8',
'javelin-behavior-differential-diff-radios' => '86f654e2', 'javelin-behavior-differential-diff-radios' => '3590beb8',
'javelin-behavior-differential-dropdown-menus' => '86f654e2', 'javelin-behavior-differential-dropdown-menus' => '3590beb8',
'javelin-behavior-differential-edit-inline-comments' => '86f654e2', 'javelin-behavior-differential-edit-inline-comments' => '3590beb8',
'javelin-behavior-differential-feedback-preview' => '86f654e2', 'javelin-behavior-differential-feedback-preview' => '3590beb8',
'javelin-behavior-differential-keyboard-navigation' => '86f654e2', 'javelin-behavior-differential-keyboard-navigation' => '3590beb8',
'javelin-behavior-differential-populate' => '86f654e2', 'javelin-behavior-differential-populate' => '3590beb8',
'javelin-behavior-differential-show-more' => '86f654e2', 'javelin-behavior-differential-show-more' => '3590beb8',
'javelin-behavior-diffusion-commit-graph' => '5e68be89', 'javelin-behavior-diffusion-commit-graph' => '5e68be89',
'javelin-behavior-diffusion-pull-lastmodified' => '5e68be89', 'javelin-behavior-diffusion-pull-lastmodified' => '5e68be89',
'javelin-behavior-maniphest-batch-selector' => '7707de41', 'javelin-behavior-maniphest-batch-selector' => '7707de41',
@ -2761,12 +2761,12 @@ celerity_register_resource_map(array(
'javelin-behavior-maniphest-transaction-preview' => '7707de41', 'javelin-behavior-maniphest-transaction-preview' => '7707de41',
'javelin-behavior-phabricator-autofocus' => '0c96375e', 'javelin-behavior-phabricator-autofocus' => '0c96375e',
'javelin-behavior-phabricator-keyboard-shortcuts' => '0c96375e', 'javelin-behavior-phabricator-keyboard-shortcuts' => '0c96375e',
'javelin-behavior-phabricator-object-selector' => '86f654e2', 'javelin-behavior-phabricator-object-selector' => '3590beb8',
'javelin-behavior-phabricator-oncopy' => '0c96375e', 'javelin-behavior-phabricator-oncopy' => '0c96375e',
'javelin-behavior-phabricator-tooltips' => '0c96375e', 'javelin-behavior-phabricator-tooltips' => '0c96375e',
'javelin-behavior-phabricator-watch-anchor' => '0c96375e', 'javelin-behavior-phabricator-watch-anchor' => '0c96375e',
'javelin-behavior-refresh-csrf' => '0c96375e', 'javelin-behavior-refresh-csrf' => '0c96375e',
'javelin-behavior-repository-crossreference' => '86f654e2', 'javelin-behavior-repository-crossreference' => '3590beb8',
'javelin-behavior-workflow' => '0c96375e', 'javelin-behavior-workflow' => '0c96375e',
'javelin-dom' => '6fb20113', 'javelin-dom' => '6fb20113',
'javelin-event' => '6fb20113', 'javelin-event' => '6fb20113',
@ -2792,7 +2792,7 @@ celerity_register_resource_map(array(
'phabricator-core-buttons-css' => '040e796f', 'phabricator-core-buttons-css' => '040e796f',
'phabricator-core-css' => '040e796f', 'phabricator-core-css' => '040e796f',
'phabricator-directory-css' => '040e796f', 'phabricator-directory-css' => '040e796f',
'phabricator-drag-and-drop-file-upload' => '86f654e2', 'phabricator-drag-and-drop-file-upload' => '3590beb8',
'phabricator-dropdown-menu' => '0c96375e', 'phabricator-dropdown-menu' => '0c96375e',
'phabricator-flag-css' => '040e796f', 'phabricator-flag-css' => '040e796f',
'phabricator-jump-nav' => '040e796f', 'phabricator-jump-nav' => '040e796f',
@ -2804,7 +2804,7 @@ celerity_register_resource_map(array(
'phabricator-prefab' => '0c96375e', 'phabricator-prefab' => '0c96375e',
'phabricator-project-tag-css' => '7839ae2d', 'phabricator-project-tag-css' => '7839ae2d',
'phabricator-remarkup-css' => '040e796f', 'phabricator-remarkup-css' => '040e796f',
'phabricator-shaped-request' => '86f654e2', 'phabricator-shaped-request' => '3590beb8',
'phabricator-standard-page-view' => '040e796f', 'phabricator-standard-page-view' => '040e796f',
'phabricator-tooltip' => '0c96375e', 'phabricator-tooltip' => '0c96375e',
'phabricator-transaction-view-css' => '040e796f', 'phabricator-transaction-view-css' => '040e796f',

View file

@ -20,7 +20,8 @@ JX.behavior('repository-crossreference', function(config) {
var target = e.getTarget(); var target = e.getTarget();
var map = {nc : 'class', nf : 'function'}; var map = {nc : 'class', nf : 'function'};
if (JX.DOM.isNode(target, 'span') && (target.className in map)) { if (JX.DOM.isNode(target, 'span') && (target.className in map)) {
var uri = JX.$U('/diffusion/symbol/' + target.innerHTML + '/'); var symbol = target.textContent || target.innerText;
var uri = JX.$U('/diffusion/symbol/' + symbol + '/');
uri.addQueryParams({ uri.addQueryParams({
type : map[target.className], type : map[target.className],
lang : config.lang, lang : config.lang,