Bug 9859: fix nsb_clean side effect
authorStéphane Delaune <stephane.delaune@biblibre.com>
Wed, 20 Mar 2013 09:54:46 +0000 (10:54 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 22 Oct 2014 17:06:14 +0000 (14:06 -0300)
Signed-off-by: Mathieu Saby <mathieu.saby@univ-rennes2.fr>
This sub was causing 2 bugs :
- tools/exports.pl --clean was removing Â
- authority search plugin used in cataloging was removing Â in suggested authorities displayed dynamicly (using ajax)
After applying the patch,
- NSB/NSE are still removed by nsb_clean
- tools/exports.pl --clean is no more removing Â
- authority search plugins is no more removing Â

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/Charset.pm

index 2950a71..9be9788 100644 (file)
@@ -415,11 +415,8 @@ sub nsb_clean {
     # handles non sorting blocks
     my ($string) = @_ ;
     $_ = $string ;
-    s/$NSB//g ;
-    s/$NSE//g ;
-    s/$NSB2//g ;
-    s/$NSE2//g ;
-    s/$C2//g ;
+    s/($C2){0,1}($NSB|$NSB2)//g ;
+    s/($C2){0,1}($NSE|$NSE2)//g ;
     $string = $_ ;
 
     return($string) ;