Clean em dashes from ISBNs during sanitization

This commit is contained in:
jrenslin committed 2024-08-14 16:41:55 +02:00
1 parent a57036789e
commit 6174c5454e
1 file changed
+1 -1
+1 -1
View File
@@ -411,7 +411,7 @@ public static function validate_isbn(string $input):string {
} }
// Remove hyphens // Remove hyphens
$input = trim(strtr($input, ["-" => "", "–" => ""])); $input = trim(strtr($input, ["-" => "", "–" => "", '—' => '']));
// ISBN 10 // ISBN 10
if (\mb_strlen($input) === 10) { if (\mb_strlen($input) === 10) {