Lines 61-79
if( !$biblio ) {
Link Here
|
61 |
} |
61 |
} |
62 |
|
62 |
|
63 |
if( !@errors && defined $review ) { |
63 |
if( !@errors && defined $review ) { |
64 |
if ($review !~ /\S/) { |
64 |
if ($review !~ /\S/) { |
65 |
push @errors, {empty=>1}; |
65 |
push @errors, {empty=>1}; |
66 |
} else { |
66 |
} else { |
67 |
$clean = C4::Scrubber->new('comment')->scrub($review); |
67 |
$clean = C4::Scrubber->new('comment')->scrub($review); |
68 |
if ($clean !~ /\S/) { |
68 |
if ($clean !~ /\S/) { |
69 |
push @errors, {scrubbed_all=>1}; |
69 |
push @errors, {scrubbed_all=>1}; |
70 |
} else { |
70 |
} else { |
71 |
if ($clean ne $review) { |
71 |
if ($clean ne $review) { |
72 |
push @errors, {scrubbed=>$clean}; |
72 |
push @errors, {scrubbed=>$clean}; |
73 |
} |
73 |
} |
74 |
my $js_ok_review = $clean; |
74 |
my $js_ok_review = $clean; |
75 |
$js_ok_review =~ s/"/"/g; # probably redundant w/ TMPL ESCAPE=JS |
75 |
$js_ok_review =~ s/"/"/g; # probably redundant w/ TMPL ESCAPE=JS |
76 |
$template->param(clean_review=>$js_ok_review); |
76 |
$template->param(clean_review=>$js_ok_review); |
77 |
if ($savedreview) { |
77 |
if ($savedreview) { |
78 |
$savedreview->set( |
78 |
$savedreview->set( |
79 |
{ |
79 |
{ |
Lines 91-99
if( !@errors && defined $review ) {
Link Here
|
91 |
} |
91 |
} |
92 |
)->store->reviewid; |
92 |
)->store->reviewid; |
93 |
} |
93 |
} |
94 |
unless (@errors){ $template->param(WINDOW_CLOSE=>1); } |
94 |
unless (@errors){ $template->param(WINDOW_CLOSE=>1); } |
95 |
} |
95 |
} |
96 |
} |
96 |
} |
97 |
} |
97 |
} |
98 |
(@errors ) and $template->param( ERRORS=>\@errors); |
98 |
(@errors ) and $template->param( ERRORS=>\@errors); |
99 |
($cgi_debug) and $template->param(cgi_debug=>1 ); |
99 |
($cgi_debug) and $template->param(cgi_debug=>1 ); |
100 |
- |
|
|