BUG#1847 - accept lowercase x in ISBN, do not accept invalid A-W,Y,Z
authorJens Frank <jeluf@users.mediawiki.org>
Sun, 10 Apr 2005 20:22:11 +0000 (20:22 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Sun, 10 Apr 2005 20:22:11 +0000 (20:22 +0000)
includes/Parser.php

index e45f745..1d49620 100644 (file)
@@ -2445,7 +2445,7 @@ class Parser
                        return $text;
                }
                $text = substr( array_shift( $a ), 1);
-               $valid = '0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+               $valid = '0123456789-Xx';
 
                foreach ( $a as $x ) {
                        $isbn = $blank = '' ;
@@ -2463,6 +2463,7 @@ class Parser
                        }
                        $num = str_replace( '-', '', $isbn );
                        $num = str_replace( ' ', '', $num );
+                       $num = str_replace( 'x', 'X', $num );
 
                        if ( '' == $num ) {
                                $text .= "ISBN $blank$x";