Skip to content

Commit 2a3384d

Browse files
Copilotrvosa
andcommitted
Fix jQuery AJAX dataType to prevent auto script execution
Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com>
1 parent a2edee3 commit 2a3384d

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

treebase-web/src/main/webapp/scripts/common.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ function openHelp(tag) {
2020
$.ajax({
2121
url: url,
2222
method: 'GET',
23+
dataType: 'text',
2324
success: function(response){
2425
top.consoleRef=window.open('','help',
2526
'width=400,height=350'

treebase-web/src/main/webapp/scripts/user/submissionSummary.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ TreeBASE.isTaxonLinkingAttempted = function(id) {
500500
$.ajax({
501501
url: '/treebase-web/json/submissionIsland.html',
502502
method: 'GET',
503+
dataType: 'text',
503504
success: function(response){
504505
var tmp;
505506
eval('tmp='+response);

0 commit comments

Comments
 (0)