Moving security to core.
diff --git a/system/core/Utf8.php b/system/core/Utf8.php
index 5d5a7ef..2a27d1f 100644
--- a/system/core/Utf8.php
+++ b/system/core/Utf8.php
@@ -107,7 +107,7 @@
 	 */
 	function safe_ascii_for_xml($str)
 	{
-		return preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S', '', $str);
+		return remove_invisible_characters($str, FALSE);
 	}
 
 	// --------------------------------------------------------------------