[open-ils-commits] r12686 - branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 26 11:30:18 EDT 2009
Author: dbs
Date: 2009-03-26 11:30:15 -0400 (Thu, 26 Mar 2009)
New Revision: 12686
Modified:
branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
Log:
Backport r12684 from trunk: escape raw ampersands as part of entityize
Modified: branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
===================================================================
--- branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm 2009-03-26 15:29:31 UTC (rev 12685)
+++ branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm 2009-03-26 15:30:15 UTC (rev 12686)
@@ -1510,6 +1510,9 @@
$string = NFC($string);
}
+ # Convert raw ampersands to ampersand entities
+ $string =~ s/&(?!\S+;)/&/gso;
+
$string =~ s/([\x{0080}-\x{fffd}])/sprintf('&#x%X;',ord($1))/sgoe;
return $string;
}
More information about the open-ils-commits
mailing list