]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Template/Plugin/L.pm
Den Confirm-Text unter SL::Template::Plugin::L::submit_tag escapen
[mfinanz.git] / SL / Template / Plugin / L.pm
index 9cf5ebb8529931eefb297affe11ddcf284dca46e..6d6b59f2d77729ffa58dbe5c1131499acb2d4818 100644 (file)
@@ -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');
 }