1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00
This commit is contained in:
Ryan Cramer
2019-04-02 11:24:29 -04:00
parent e9620a3a47
commit dd183c0571
2 changed files with 3 additions and 3 deletions

View File

@@ -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';

View File

@@ -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 = '';