Encoding parenthesis in generated URLs

Closes #36
This commit is contained in:
Jeff Avallone 2018-02-10 11:37:00 -05:00
parent 988f5ca7d5
commit b4ea423221
1 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,9 @@ export default class Regexper {
// Set the URL hash. This method exists to facilitate automated testing
// (since changing the URL can throw off most JavaScript testing tools).
_setHash(hash) {
location.hash = encodeURIComponent(hash);
location.hash = encodeURIComponent(hash)
.replace(/\(/g, '%28')
.replace(/\)/g, '%29');
}
// Retrieve the current URL hash. This method is also mostly for supporting