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 = []
|
var s = []
|
||||||
for (var key in hash) {
|
for (var key in hash) {
|
||||||
var val = hash[key]
|
var val = hash[key]
|
||||||
s.push(escape(key) + "=" + escape(val))
|
s.push(encodeURIComponent(key) + "=" + encodeURIComponent(val))
|
||||||
}
|
}
|
||||||
return s.join("&")
|
return s.join("&")
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ export function addguesscontrols(elem, word, wordlist, xid) {
|
||||||
host.guesses = []
|
host.guesses = []
|
||||||
host.xid = xid
|
host.xid = xid
|
||||||
var xhr = new XMLHttpRequest()
|
var xhr = new XMLHttpRequest()
|
||||||
xhr.open("GET", "/bloat/wonkles?w=" + escape(wordlist))
|
xhr.open("GET", "/bloat/wonkles?w=" + encodeURIComponent(wordlist))
|
||||||
xhr.responseType = "json"
|
xhr.responseType = "json"
|
||||||
xhr.onload = function() {
|
xhr.onload = function() {
|
||||||
var wordlist = xhr.response.wordlist
|
var wordlist = xhr.response.wordlist
|
||||||
|
|
Loading…
Reference in New Issue