From: Dan Wells Date: Wed, 23 Oct 2013 16:03:29 +0000 (-0400) Subject: Restore decomposed support in entityize() X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2Fdbwells%2Fencode-changed-behaviour;p=working%2FEvergreen.git 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 --- 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;