diff --git a/blocks/ORB/Common.pm b/blocks/ORB/Common.pm index b83d606..1c3ac2d 100644 --- a/blocks/ORB/Common.pm +++ b/blocks/ORB/Common.pm @@ -24,6 +24,7 @@ use parent qw(ORB); # This class extends the ORB block class use experimental qw(smartmatch); use v5.14; use JSON; +use Data::Dumper; # How many ingredient rows should appear in the empty form? use constant DEFAULT_INGREDIENT_COUNT => 5; @@ -347,6 +348,8 @@ sub _validate_ingredients { return $self -> {"template"} -> load_template("error/error_item.tem", { "%(error)s" => "{L_ERR_JSONFORMAT}: $@" }) if($@); + print STDERR "Got ingdata ".Dumper($ingdata); + foreach my $ingred (@{$ingdata -> {"ingredients"}}) { if($ingred -> {"separator"}) { $errors .= $self -> _validate_separator($args, $ingred); diff --git a/modules/ORB.pm b/modules/ORB.pm index 97c16c0..9904b45 100755 --- a/modules/ORB.pm +++ b/modules/ORB.pm @@ -77,8 +77,8 @@ sub new { "recipename" => '^[-\w,.\' ]+$', "tags" => '^[-\w ]+$', "quantity" => '^[\d\w./]+$', - "sepname" => '^[-\w,.:()&;#*\ ]{1,255}$', - "ingredient" => '^[-\w,.:()&;#*\ ]{1,255}$', + "sepname" => '^[-\w,.:()&;#*\ \']{1,255}$', + "ingredient" => '^[-\w,.:()&;#*\ \']{1,255}$', "notes" => '^[-()\w,."!\'\\/£$%;:@#?><* ]{1,255}$', }; diff --git a/templates/default/clone/content.tem b/templates/default/clone/content.tem index 5cead7a..eb2bc04 100644 --- a/templates/default/clone/content.tem +++ b/templates/default/clone/content.tem @@ -126,7 +126,7 @@