Allow more characters in ingredient notes

This commit is contained in:
Chris 2019-02-15 21:15:54 +00:00
parent e8dbbfc354
commit 7ad5943b41
2 changed files with 2 additions and 2 deletions

View File

@ -297,7 +297,7 @@ sub _validate_ingredient {
# Notes get copied, as long as they don't contain junk
if($ingdata -> {"notes"}) {
if($ingdata -> {"notes"} =~ /$self->{formats}->{notes}/) {
$ingredient -> {"notes"} = $ingdata -> {"notes"};
$ingredient -> {"notes"} = $self -> {"template"} -> html_clean($ingdata -> {"notes"});
} else {
$errors .= $self -> {"template"} -> load_template("error/error_item.tem",
{ "%(error)s" => "{L_ERR_BADNOTES}" });

View File

@ -79,7 +79,7 @@ sub new {
"quantity" => '^[\d\w./]+$',
"sepname" => '^[-\w,. ]{1,255}$',
"ingredient" => '^[-\w,. ]{1,255}$',
"notes" => '^[-()\w,. ]{1,255}$',
"notes" => '^[-()\w,."!\'\\/£$%;:@#?><* ]{1,255}$',
};
return $self;