From 839eafa6afa5d489ef81b21a61918f39996c41ae Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Sun, 10 Apr 2005 20:22:11 +0000 Subject: [PATCH] BUG#1847 - accept lowercase x in ISBN, do not accept invalid A-W,Y,Z --- includes/Parser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index e45f745f0e..1d496202a6 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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"; -- 2.20.1