summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Util.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-08-04 20:51:22 +0200
committerlpsolit%gmail.com <>2005-08-04 20:51:22 +0200
commit35f1ce88e12f8eee0d47fdc69d38cd7a4b12732d (patch)
treefa6c7f8dd0e3cabefd256606fd988d6b88906058 /Bugzilla/Util.pm
parent1f3e3f23e9f52cc74b19fe184004b67441b10ee1 (diff)
downloadbugzilla-35f1ce88e12f8eee0d47fdc69d38cd7a4b12732d.tar.gz
bugzilla-35f1ce88e12f8eee0d47fdc69d38cd7a4b12732d.tar.xz
Bug 126266: Use UTF-8 (Unicode) charset encoding for pages and email for NEW installations - Patch by byron jones (glob) <bugzilla@glob.com.au> r=wurblzap a=justdave
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r--Bugzilla/Util.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index b694de752..43100b160 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -38,7 +38,7 @@ use base qw(Exporter);
diff_arrays diff_strings
trim wrap_comment find_wrap_point
format_time format_time_decimal
- file_mod_time
+ file_mod_time is_7bit_clean
bz_crypt check_email_syntax);
use Bugzilla::Config;
@@ -374,6 +374,10 @@ sub ValidateDate {
}
}
+sub is_7bit_clean {
+ return $_[0] !~ /[^\x20-\x7E\x0A\x0D]/;
+}
+
1;
__END__
@@ -597,6 +601,11 @@ Search for a comma, a whitespace or a hyphen to split $string, within the first
$maxpos characters. If none of them is found, just split $string at $maxpos.
The search starts at $maxpos and goes back to the beginning of the string.
+=item C<is_7bit_clean($str)>
+
+Returns true is the string contains only 7-bit characters (ASCII 32 through 126,
+ASCII 10 (LineFeed) and ASCII 13 (Carrage Return).
+
=back
=head2 Formatting Time