From 66efa3e59b959fd43b6811311a7d36aa0304889e Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Wed, 23 Oct 2013 12:03:29 -0400 Subject: [PATCH] Restore decomposed support in entityize() Now that we have updated our test check, let's restore the missing code bits to pass the test. Signed-off-by: Dan Wells --- Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm index be6fd2ae92..b5900eda1c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/AppUtils.pm @@ -1513,9 +1513,11 @@ sub entityize { my($self, $string, $form) = @_; $form ||= ""; - # If we're going to convert non-ASCII characters to XML entities, - # we had better be dealing with a UTF8 string to begin with - $string = NFC($string); + if ($form eq 'D') { + $string = NFD($string); + } else { + $string = NFC($string); + } # Convert raw ampersands to entities $string =~ s/&(?!\S+;)/&/gso; -- 2.11.0