Mercurial > hg > orthanc-webviewer
comparison WebApplication/viewer.js @ 302:c0c5b50635e7
fix XSS
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 21 Feb 2022 15:40:51 +0100 |
parents | e376158e2dbb |
children | fb7d62e3235e |
comparison
equal
deleted
inserted
replaced
301:e89cc1536b51 | 302:c0c5b50635e7 |
---|---|
422 cache: false, | 422 cache: false, |
423 async: false, | 423 async: false, |
424 success: function(volume) { | 424 success: function(volume) { |
425 if (volume.Slices.length != 0) { | 425 if (volume.Slices.length != 0) { |
426 instances = volume.Slices; | 426 instances = volume.Slices; |
427 $('#topright').html(volume.PatientID + '<br/>' + | 427 var topRightElement = $('<span>'); |
428 volume.PatientName + '<br/>' + | 428 topRightElement.append($('<span>', { text: volume.PatientID})); |
429 volume.StudyDescription + '<br/>' + | 429 topRightElement.append($('<br/>')); |
430 volume.SeriesDescription + '<br/>'); | 430 topRightElement.append($('<span>', { text: volume.PatientName})); |
431 topRightElement.append($('<br/>')); | |
432 topRightElement.append($('<span>', { text: volume.StudyDescription})); | |
433 topRightElement.append($('<br/>')); | |
434 topRightElement.append($('<span>', { text: volume.SeriesDescription})); | |
435 topRightElement.append($('<br/>')); | |
436 | |
437 $('#topright').empty(); | |
438 $('#topright').append(topRightElement); | |
431 } | 439 } |
432 }, | 440 }, |
433 failure: function() { | 441 failure: function() { |
434 alert(unsupportedMessage); | 442 alert(unsupportedMessage); |
435 } | 443 } |