Skip to content

Commit 9f7f5bd

Browse files
Merge pull request #5903 from Countly/SER-2255-escaped-html-characters-in-feedback-and-rating-widget-lists-release-branch
[SER-2255] escaped html characters in feedback and rating widget lists release branch
2 parents ef9ebce + dbc39d4 commit 9f7f5bd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

plugins/star-rating/frontend/public/javascripts/countly.models.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*global countlyCommon, app, jQuery, $*/
1+
/*global countlyCommon, app, jQuery,_ $*/
22
(function(starRatingPlugin) {
33
var _pv = {};
44
// feedbackd datas
@@ -271,6 +271,15 @@
271271
app_id: countlyCommon.ACTIVE_APP_ID
272272
},
273273
success: function(json) {
274+
// unescape the properties shown in the list
275+
json.forEach(row => {
276+
if (typeof row?.internalName === "string") {
277+
row.internalName = countlyCommon.unescapeHtml(row.internalName);
278+
}
279+
if (typeof row?.targeting?.user_segmentation === "string") {
280+
row.targeting.user_segmentation = countlyCommon.unescapeHtml(row.targeting.user_segmentation);
281+
}
282+
});
274283
_fwd = json;
275284
}
276285
});

0 commit comments

Comments
 (0)