From 7ad5943b41f411e54528648f699f1e669fde3209 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 15 Feb 2019 21:15:54 +0000 Subject: [PATCH] Allow more characters in ingredient notes --- blocks/ORB/Common.pm | 2 +- modules/ORB.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/ORB/Common.pm b/blocks/ORB/Common.pm index 0ff259a..e5c29e2 100644 --- a/blocks/ORB/Common.pm +++ b/blocks/ORB/Common.pm @@ -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}" }); diff --git a/modules/ORB.pm b/modules/ORB.pm index daadffb..2fd3fdc 100755 --- a/modules/ORB.pm +++ b/modules/ORB.pm @@ -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;