You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With details specified in this issue, I would like to suggest changing the regular expression assigned to the variable 'searchPlaceholder' in urlMatcherFactory, so that url query parameters containing periods are correctly routed.
So instead of just the character set \w\[\]- begin considered valid, \w\[\].- would now be considered as valid. My original thought was to include a wider range of possible valid characters, however thinking now that this should be modified on an 'as needed' basis?
Not sure if this should effect the 'placeholder' variable as well, however for my current problem just modifying 'searchPlaceholder' appears to resolve the issue.
Update:
After making this change locally, I noticed that I was getting an invalid parameter exception from the regex inside of the 'addParameter' function:
if (!/^\w+(-+\w+)*(?:\[\])?$/.test(id)) throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'");
After testing a couple of different options, it seems like this modification would allow for periods inside of a parameter name to work as well:
if (!/^\w+([-.]+\w+)*(?:\[\])?$/.test(id)) throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'");
So this change would include this modification as well.
The text was updated successfully, but these errors were encountered:
This regards version 0.2.15 of ui-router.
With details specified in this issue, I would like to suggest changing the regular expression assigned to the variable 'searchPlaceholder' in urlMatcherFactory, so that url query parameters containing periods are correctly routed.
So instead of just the character set
\w\[\]-
begin considered valid,\w\[\].-
would now be considered as valid. My original thought was to include a wider range of possible valid characters, however thinking now that this should be modified on an 'as needed' basis?This change would modify:
to be:
Not sure if this should effect the 'placeholder' variable as well, however for my current problem just modifying 'searchPlaceholder' appears to resolve the issue.
Update:
After making this change locally, I noticed that I was getting an invalid parameter exception from the regex inside of the 'addParameter' function:
After testing a couple of different options, it seems like this modification would allow for periods inside of a parameter name to work as well:
So this change would include this modification as well.
The text was updated successfully, but these errors were encountered: