[open-ils-commits] r12685 - branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 26 11:29:33 EDT 2009


Author: dbs
Date: 2009-03-26 11:29:31 -0400 (Thu, 26 Mar 2009)
New Revision: 12685

Modified:
   branches/rel_1_4/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/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2009-03-26 15:27:55 UTC (rev 12684)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2009-03-26 15:29:31 UTC (rev 12685)
@@ -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