Allow unicode characters in config

This commit is contained in:
Keegan
2016-03-15 12:06:04 +11:00
parent 756cdc0d9e
commit 9347c9f3d2
3 changed files with 25 additions and 91 deletions
+6 -1
View File
@@ -20,9 +20,14 @@
var returnTo = getQueryParam('return_to');
var data = decodeURIComponent(location.hash.substring(1));
if (data) {
// Check if we dealing with a base64 encoded URI
if (data && data.charAt(0) !== '<') {
data = window.atob(data).replace('$$RETURN_TO$$', returnTo);
window.location.href = 'data:text/html;base64,' + encodeURIComponent(window.btoa(data));
} else if (data) {
data = data.replace('$$RETURN_TO$$', returnTo);
window.location.href = 'data:text/html;charset=utf-8,' + encodeURIComponent(data);
}
</script>
<body>