mirror of
https://github.com/pebble-dev/clay.git
synced 2026-10-26 22:59:56 -04:00
Allow unicode characters in config
This commit is contained in:
1 parent
756cdc0d9e
commit
9347c9f3d2
3 files changed
+25
-91
No files matched your search
+6
-1
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user