From b4d999a5a6e2e7fdb20f4a2456439895183470df Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Wed, 27 Mar 2019 12:56:16 +0000 Subject: [PATCH] MDL-64511 privacy: encode data URL when loading content. Previously paths that included ? or # characters would break loading. --- privacy/export_files/general.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/privacy/export_files/general.js b/privacy/export_files/general.js index b88786184af..11fe97ccf86 100644 --- a/privacy/export_files/general.js +++ b/privacy/export_files/general.js @@ -62,7 +62,7 @@ function loadContent(datafile, callback) { } newscript.type = 'text/javascript'; - newscript.src = data; + newscript.src = encodeURIComponent(data); newscript.charset = 'utf-8'; document.getElementsByTagName("head")[0].appendChild(newscript); @@ -135,4 +135,4 @@ window.$(document).ready(function() { e.stopPropagation(); handleClick(window.$(this)); }); -}); \ No newline at end of file +});