-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filters with backslashes get double escaped #74
Comments
I did see on the filters API page that it says backslashes have to be escaped if you want to be able to search for a literal backslash. I would think, though, that the user creating the filter should escape a backslash so that the backslash can also be used to escape regexp characters. |
Yes, I think that makes sense. I'll have to revisit this when I work on the new filtering again. |
Encountered the same problem. +1 |
Trying to create a filter like the following which needs to escape the question mark since it is a reserved character in regular expressions. Filter is:
:page_path.contains => '^/search?'
The string that should be sent to Google Analytics is:
filters=ga:pagePath%3D~%5E%2Fsearch%5C%3F
However, to_params escapes the backslash so that this is sent:
filters=ga:pagePath%3D~%5E%2Fsearch%5C%5C%3F
Not sure why to_params escapes backslashes, but at least in this case it's making it impossible to escape the question mark.
The text was updated successfully, but these errors were encountered: