Why replace '%20' with '+'? 

I causes issues if you later try to parse the serialized string with decodeURIComponent and %20 should be just as compatible as +