projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Markup corrections and other minor changes.
[koha.git]
/
C4
/
Charset.pm
diff --git
a/C4/Charset.pm
b/C4/Charset.pm
index
5c5e7ce
..
65da33a
100644
(file)
--- a/
C4/Charset.pm
+++ b/
C4/Charset.pm
@@
-18,6
+18,8
@@
package C4::Charset;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
# Suite 330, Boston, MA 02111-1307 USA
use strict;
+use warnings;
+
use MARC::Charset qw/marc8_to_utf8/;
use Text::Iconv;
use MARC::Charset qw/marc8_to_utf8/;
use Text::Iconv;
@@
-299,6
+301,9
@@
to work, at the possible risk of some data loss.
sub StripNonXmlChars {
my $str = shift;
sub StripNonXmlChars {
my $str = shift;
+ if (!defined($str) || $str eq ""){
+ return "";
+ }
$str =~ s/[^\x09\x0A\x0D\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//g;
return $str;
}
$str =~ s/[^\x09\x0A\x0D\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//g;
return $str;
}