google-code-export / digitalus-cms

Automatically exported from code.google.com/p/digitalus-cms
1 stars 1 forks source link

Cannot create page with title in cyrillic #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to page, and try to create new
2. For page title type something non-latin (for example страница)
3.

What is the expected output? What do you see instead?
Page should be created as in previous releases. Instead a validation error 
Please only use alphanumeric characters, hyphens and empty space! occurs

What version of the product are you using? On what operating system?
svn, revision 703

Please provide any additional information below.

Original issue reported on code.google.com by Darha...@gmail.com on 7 Mar 2010 at 1:59

GoogleCodeExporter commented 9 years ago
With r690 I introduced a regex validator for the page name.
The regex is defined in /application/models/Page.php line 56:
const PAGE_NAME_REGEX = '/^[a-zA-Z0-9- ]*$/';

This is intended!!
It is still possible to set the page label at admin->navigation with cyrillic 
letters.

Cheers,
LT.

Original comment by lowtower1974@gmail.com on 7 Mar 2010 at 4:02

GoogleCodeExporter commented 9 years ago
You can simply change the regex if You insist on having cyrillic letters in the 
page
name to the following:
const PAGE_NAME_REGEX = '/^[\p{L}- ]*$/u';

Cheers,
LT

Original comment by lowtower1974@gmail.com on 7 Mar 2010 at 4:14