Skip to content

Commit

Permalink
sun-ui. download pricavy: fix escape (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
edospadoni authored Feb 14, 2024
1 parent 1dd0004 commit f09afcc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sun/sun-ui/src/components/details-view/HotspotsDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2887,17 +2887,15 @@ export default {
);
},
printPrivacy() {
var finalPrivacy = "data:text/plain;charset=utf-8," + (this.selectedPrivacyBody || "");
var encodedUri = encodeURI(finalPrivacy);
var finalPrivacy = "data:text/plain;charset=utf-8," + encodeURIComponent(this.selectedPrivacyBody || "");
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("href", finalPrivacy);
link.setAttribute("download", "privacy" + ".txt");
link.click();
var finalTos = "data:text/plain;charset=utf-8," + this.selectedTosBody;
var encodedUri = encodeURI(finalTos);
var finalTos = "data:text/plain;charset=utf-8," + encodeURIComponent(this.selectedTosBody || "");
var link = document.createElement("a");
link.setAttribute("href", encodedUri);
link.setAttribute("href", finalTos);
link.setAttribute("download", "tos" + ".txt");
link.click();
},
Expand Down

0 comments on commit f09afcc

Please sign in to comment.