mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 17:54:44 +02:00
Fix issue processwire/processwire-issues#840
This commit is contained in:
@@ -319,8 +319,8 @@ class PagesNames extends Wire {
|
||||
$name = wireDate(trim($format));
|
||||
$formatType = 'date';
|
||||
|
||||
} else if(strpos($format, ' ') !== false || strpos($format, '/') !== false) {
|
||||
// date assumed when spaces or slashes present in format
|
||||
} else if(strpos($format, ' ') !== false || strpos($format, '/') !== false || strpos($format, ':') !== false) {
|
||||
// date assumed when spaces, slashes or colon present in format
|
||||
$name = wireDate($format);
|
||||
$formatType = 'date';
|
||||
|
||||
|
@@ -1026,7 +1026,7 @@ class ProcessPageAdd extends Process implements ConfigurableModule, WirePageEdit
|
||||
// allow for nameFormat to come from a name_format GET variable
|
||||
$nameFormat = $this->wire('input')->get('name_format');
|
||||
if(strlen($nameFormat)) {
|
||||
$nameFormat = $this->sanitizer->chars($this->sanitizer->text($nameFormat), '-_[alpha][digit]', '-');
|
||||
$nameFormat = $this->sanitizer->chars($this->sanitizer->text($nameFormat), '-_:./| [alpha][digit]', '-');
|
||||
} else {
|
||||
if(count($parent->template->childTemplates) > 1) return false;
|
||||
$nameFormat = '';
|
||||
|
Reference in New Issue
Block a user