Skip to content

Commit

Permalink
Item1721: Fix pattern to avoid warnings when there is no javascript: …
Browse files Browse the repository at this point in the history
…in a onsubmit

git-svn-id: http://svn.foswiki.org/trunk@4141 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
OlivierRaginel authored and OlivierRaginel committed Jun 15, 2009
1 parent b6097b9 commit 3d72def
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=(["'])(\s*javascript:)?(.*)\1/onsubmit=${1}${2}foswikiStrikeOne(this);$3$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 3d72def

Please sign in to comment.