| 3069 | var decodeCache = {}; |
| 3070 | |
| 3071 | function getDecodeCache(exclude) { |
| 3072 | var i, ch, cache = decodeCache[exclude]; |
| 3073 | if (cache) { return cache; } |
| 3074 | |
| 3075 | cache = decodeCache[exclude] = []; |
| 3076 | |
| 3077 | for (i = 0; i < 128; i++) { |
| 3078 | ch = String.fromCharCode(i); |
| 3079 | cache.push(ch); |
| 3080 | } |
| 3081 | |
| 3082 | for (i = 0; i < exclude.length; i++) { |
| 3083 | ch = exclude.charCodeAt(i); |
| 3084 | cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2); |
| 3085 | } |
| 3086 | |
| 3087 | return cache; |
| 3088 | } |
| 3089 | |
| 3090 | |
| 3091 | // Decode percent-encoded string. |