21278 Posts in 5728 Topics by 2599 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 704 Views |
-
Non Latin address/URL

11 February 2011 at 2:52am
Hi, I am facing a problem when I try to change the URL of pages in SS. I have set the locale correctly to Greek, but every time I try to enter a value containing greek characters I get the following error:
Changed value to '' : URLs can only be made up of letters, digits and hyphens.
Although I have searched for a solution I haven't found any. Is there a way around this?
I understand what makes a valid url and which characters should be excluded but is this a bug or a missing feature? -
Re: Non Latin address/URL

12 February 2011 at 3:02pm
I understand what makes a valid url and which characters should be excluded but is this a bug or a missing feature?
I believe the UniqueRestrictedTextField for the URLSegment validates on alphanumeric and hyphens. There is a class to handle some translations of unicode strings to 'safe' versions (Transliterator.php) but not sure if that is used in the validation.
-
Re: Non Latin address/URL

8 April 2011 at 8:16pm Last edited: 8 April 2011 8:17pm
Hi, I've checked the SiteTree class and I found the UniqueRestrictedTextField regex that matches the allowed characters ("[^A-Za-z0-9-]+").
I suppose that PCRE is used to match this, so would adding \p{Greek} to the expression work,
e.g. "[^A-Za-z\p{Greek}0-9-]+" ?(Sorry but I'm not really familiar with regex's so I'm not sure if this is correct)
-
Re: Non Latin address/URL

21 April 2011 at 1:35am
Ok, I've changed the regex in Sitetree.php to the one in the previous post, and at least SS stopped complaining about restricted characters. The problem though remains and page URL's change to page-* after save.
Does anyone know where the change is happening?
| 704 Views | ||
|
Page:
1
|
Go to Top |


