Skip to content

Commit

Permalink
MDL-66245 privacy: Encode each part of the data URL instead of the whole
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Feb 10, 2020
1 parent cb38ab1 commit 3a836cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion privacy/export_files/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ function loadContent(datafile, callback) {
}

newscript.type = 'text/javascript';
newscript.src = encodeURIComponent(data);
var dataParts = data.split('/');
dataParts.forEach(function(part, index) {
this[index] = encodeURIComponent(part);
}, dataParts);
newscript.src = dataParts.join('/');
newscript.charset = 'utf-8';
document.getElementsByTagName("head")[0].appendChild(newscript);

Expand Down

0 comments on commit 3a836cc

Please sign in to comment.