Skip to content
This repository has been archived by the owner. It is now read-only.

% sign not accepted #12

Closed
csakai opened this issue Jun 16, 2015 · 3 comments
Closed

% sign not accepted #12

csakai opened this issue Jun 16, 2015 · 3 comments

Comments

@csakai
Copy link

@csakai csakai commented Jun 16, 2015

I tried entering the following regex into the regexper web app:
%[a-zA-Z0-9]{2}

in order to look for special characters in URLs (ie: %20 for whitespace)
I got a message: Malformed expression in URL.
when breaking down the regex, I find that everything works except for %

Therefore, it would appear regexper can't handle %, escaped or not

@javallone
Copy link
Owner

@javallone javallone commented Jun 16, 2015

I suspect this may be due to your browser not encoding the regex into the URL correctly. I've tried the regex you provided in Chrome and it rendered successfully.

Could you please post the URL you end up at when you get that error along with your web browser details (at the very least which browser you're using). Also, could you try loading this URL (it is the URL I get from Chrome): http://regexper.com/#%5C%25%5Ba-zA-Z0-9%5D%7B2%7D and let me know if it renders or if you receive the same error

@csakai
Copy link
Author

@csakai csakai commented Jun 16, 2015

This was the url that was formed by putting this request through firefox 38.0:
http://regexper.com/#\%25[a-zA-Z0-9]{2}

I just noticed how wacky that looks. Weirdly, when I hover over your link, it looks the same as the URL I got. I try copy-pasting it to the location bar, and it resolves to the same URL again. Very strange behavior.

@javallone
Copy link
Owner

@javallone javallone commented Jun 16, 2015

Looks like this is due to a long-standing Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=483304

I'm going to add a work-around to detect Firefox's odd behavior.

@javallone javallone closed this in e1f5891 Jun 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.