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
If the resource name contains a dot, the dot will also remain in the URL when saved. Even if you set alphanumeric in the friendly_alias_restrict_chars system setting.
I'm not sure if the dot refers to the letters, but it doesn't seem like it should.
Environment
MODX 2.8.8 >
The text was updated successfully, but these errors were encountered:
@opengeek@theboxer - This does raise an interesting question, in the following two cases in filterPathSegment why do we allow the dot and % chars? Strictly-speaking, it doesn't make sense to me - these chars are simply neither alpha nor numeric (and not used to represent an alphanumeric char [i.e., url %-encoded ones would not fit these criteria anyway]).
case 'alphanumeric':
/* restrict segment to alphanumeric characters only */$segment = preg_replace('/[^\.%A-Za-z0-9 _-]/', '', $segment);
break;
case 'alpha':
/* restrict segment to alpha characters only */$segment = preg_replace('/[^\.%A-Za-z _-]/', '', $segment);
break;
I can see why the dash, underscore, and space are included as they're all ultimately replaced by the single preferred later word delimiter char.
If it turns out these rules should stay exactly as-is, we should be more clear in the description for friendly_alias_restrict_chars that certain other chars will be preserved/used to construct the final alias.
Bug report
Summary
If the resource name contains a dot, the dot will also remain in the URL when saved. Even if you set
alphanumeric
in thefriendly_alias_restrict_chars
system setting.I'm not sure if the dot refers to the letters, but it doesn't seem like it should.
Environment
MODX 2.8.8 >
The text was updated successfully, but these errors were encountered: