From: Thomas Heck Date: Tue, 4 Sep 2012 13:44:43 +0000 (+0200) Subject: Den Confirm-Text unter SL::Template::Plugin::L::submit_tag escapen X-Git-Tag: release-3.0.0beta1~252 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f2b76d67f773954dcfa59ff7c3ebb6f6607e2e43;p=kivitendo-erp.git Den Confirm-Text unter SL::Template::Plugin::L::submit_tag escapen --- diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 9cf5ebb85..6d6b59f2d 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -301,7 +301,9 @@ sub submit_tag { my ($self, $name, $value, @slurp) = @_; my %attributes = _hashify(@slurp); - $attributes{onclick} = "if (confirm('" . delete($attributes{confirm}) . "')) return true; else return false;" if $attributes{confirm}; + if ( $attributes{confirm} ) { + $attributes{onclick} = 'return confirm("'. _J(delete($attributes{confirm})) .'");'; + } return $self->input_tag($name, $value, %attributes, type => 'submit', class => 'submit'); }