Allow underscores in calendar/addressbook uris. Fixes #320

This commit is contained in:
Evert Pot 2016-02-04 03:29:10 -05:00
parent 17ee76b88a
commit 7bdbfd7a13
2 changed files with 3 additions and 2 deletions

View file

@ -18,6 +18,7 @@ ChangeLog
* Fixed: bug when using a MySQL schema name that contains a whitespace.
* Twig is now a composer dependency.
* Moved documentation to sabre.io.
* #320: Allow underscores in calendar/addressbook uris.
0.2.7 (2014-02-02)

View file

@ -308,7 +308,7 @@ class Form {
}
public function validateTokenid($sValue, \Formal\Form\Morphology $oMorpho, \Formal\Element $oElement) {
if(!preg_match("/^[a-z0-9\-]+$/", $sValue)) {
if(!preg_match("/^[a-z0-9\-_]+$/", $sValue)) {
return "<strong>" . $oElement->option("label") . "</strong> is not valid. Allowed characters are digits, lowercase letters and the dash symbol '-'.";
}
@ -425,4 +425,4 @@ HTML;
public function refreshed() {
return intval(\Flake\Util\Tools::POST("refreshed")) === 1;
}
}
}