Skip to content

Commit 0fc25a3

Browse files
committed
HTML-escape the abstract, experiment and sample descriptions displayed by dropDownUtils.js
1 parent ebb8ffb commit 0fc25a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

panoramapublic/webapp/PanoramaPublic/js/dropDownUtil.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ viewExperimentDetails = function (obj, experimentContainer, id, detailsPageURL)
6666
var results;
6767
if(object.rows[rowNum][type] != null)
6868
{
69-
if(object.rows[rowNum][type].length > 500)
69+
let description = object.rows[rowNum][type];
70+
if(description.length > 500)
7071
{
71-
results = object.rows[rowNum][type].substring(0,500)+"<a href='"+detailsPageURL+"'>...more.</a>";
72+
results = LABKEY.Utils.encodeHtml(description.substring(0,500)) +"<a href='"+ LABKEY.Utils.encodeHtml(detailsPageURL) +"'>...more.</a>";
7273
}
7374
else {
74-
results =object.rows[rowNum][type];
75+
results = LABKEY.Utils.encodeHtml(description);
7576
}
7677
}
7778
else {results = null;}

0 commit comments

Comments
 (0)