encodeURIComponent is how we spell escape in this century
from thinegen
This commit is contained in:
parent
077f37d46c
commit
c92ad40a10
|
@ -2,7 +2,7 @@ function encode(hash) {
|
|||
var s = []
|
||||
for (var key in hash) {
|
||||
var val = hash[key]
|
||||
s.push(escape(key) + "=" + escape(val))
|
||||
s.push(encodeURIComponent(key) + "=" + encodeURIComponent(val))
|
||||
}
|
||||
return s.join("&")
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ export function addguesscontrols(elem, word, wordlist, xid) {
|
|||
host.guesses = []
|
||||
host.xid = xid
|
||||
var xhr = new XMLHttpRequest()
|
||||
xhr.open("GET", "/bloat/wonkles?w=" + escape(wordlist))
|
||||
xhr.open("GET", "/bloat/wonkles?w=" + encodeURIComponent(wordlist))
|
||||
xhr.responseType = "json"
|
||||
xhr.onload = function() {
|
||||
var wordlist = xhr.response.wordlist
|
||||
|
|
Loading…
Reference in New Issue