Skip to content

Commit

Permalink
Item1721: Let the foswikiStrikeOne also work in onsubmit with javascr…
Browse files Browse the repository at this point in the history
…ipt: prefix

git-svn-id: http://svn.foswiki.org/trunk@4120 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KennethLavrsen authored and KennethLavrsen committed Jun 14, 2009
1 parent 0250b24 commit 11cbe61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/lib/Foswiki/Validation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ onsubmit in the form tag.
sub addOnSubmit {
my ($form) = @_;
unless ( $form =~
s/\bonsubmit=(["'])(.*)\1/onsubmit=${1}foswikiStrikeOne(this);$2$1/i )
s/\bonsubmit=(["'])(\s*javascript:)?(.*)\1/onsubmit=${1}${2}foswikiStrikeOne(this);$3$1/i )
{
$form =~ s/>$/ onsubmit="foswikiStrikeOne(this)">/;
}
Expand Down

0 comments on commit 11cbe61

Please sign in to comment.