URIDECODE
This commit is contained in:
parent
8f32672d6e
commit
07e569e894
@ -30,7 +30,7 @@
|
||||
}
|
||||
jsonObj = n;
|
||||
jsonStr = JSON.stringify(jsonObj);
|
||||
out.innerText = base + "?" + window.btoa(jsonStr);
|
||||
out.innerText = base + "?" + window.encodeURIComponent(window.btoa(jsonStr));
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -47,7 +47,11 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var jsonStr = window.atob(window.location.search.slice(1));
|
||||
var rawStr = window.location.search.slice(1);
|
||||
if (rawStr.indexOf("%") !== -1) {
|
||||
rawStr = window.decodeURIComponent(rawStr);
|
||||
}
|
||||
var jsonStr = window.atob(rawStr);
|
||||
var jsonObj = JSON.parse(jsonStr);
|
||||
var t1 = document.getElementById("t1");
|
||||
t1.innerText = "Tere "+jsonObj+"!";
|
||||
|
Loading…
Reference in New Issue
Block a user