Skip to content

Commit

Permalink
Fixed metadata link for invalid item title(xss)
Browse files Browse the repository at this point in the history
  • Loading branch information
as0050629 committed Jan 16, 2024
1 parent 4e235fa commit a3f5273
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geoportal/src/main/webapp/app/search/ItemCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function(declare, lang, array, string, topic, xhr, on, appTopics, domStyle, domC
_renderDataHtml: function(item, uri) {
console.log(item);
var itemHtml = new ItemHtml({
title: item.title,
title: this._stripDialogTitle(item.title),
uri: uri,
style: "width: 80%; max-width: 80%; height: 80%; max-height: 80%;",
onHide: function() {
Expand Down Expand Up @@ -897,9 +897,9 @@ function(declare, lang, array, string, topic, xhr, on, appTopics, domStyle, domC
}
},

_strip: function(html) {
_stripDialogTitle: function(html) {
let doc = new DOMParser().parseFromString(html, 'text/html');
return doc.body.textContent || "";
return doc.body.textContent || "Metadata Information";
}
});

Expand Down

0 comments on commit a3f5273

Please sign in to comment.