From f2b76d67f773954dcfa59ff7c3ebb6f6607e2e43 Mon Sep 17 00:00:00 2001 From: Thomas Heck Date: Tue, 4 Sep 2012 15:44:43 +0200 Subject: [PATCH] Den Confirm-Text unter SL::Template::Plugin::L::submit_tag escapen --- SL/Template/Plugin/L.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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'); } -- 2.20.1