Created
April 8, 2009 14:25
-
-
Save turingmachine/91793 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ./lib/TWiki/Plugins/SpreadSheetPlugin/Calc.pm.old 2009-04-08 16:08:28.000000000 +0200 | |
+++ ./lib/TWiki/Plugins/SpreadSheetPlugin/Calc.pm 2009-04-08 16:06:59.000000000 +0200 | |
@@ -1075,8 +1075,10 @@ | |
for my $i (0 .. $#list ) { | |
$val = $list[$i] || ""; | |
# search first float pattern, skip over HTML tags | |
- if( $val =~ /^\s*(?:<[^>]*>)*\$?([\-\+]*[0-9\.]+).*/o ) { | |
- $list[$i] = $1; # untainted variable, possibly undef | |
+ if( $val =~ /^\s*(?:<[^>]*>)*\$?([\-\+]*[0-9\.,]+).*/o ) { | |
+ my $number = $1; | |
+ $number =~ s/,//; | |
+ $list[$i] = $number; # untainted variable, possibly undef | |
} else { | |
$list[$i] = undef; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment