converted to unix-style eol
[www-register-wizard.git] / helpers / xml_helper.php
index 83e2bb3..90cce3d 100644 (file)
@@ -1,62 +1,62 @@
-<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');\r
-/**\r
- * CodeIgniter\r
- *\r
- * An open source application development framework for PHP 4.3.2 or newer\r
- *\r
- * @package            CodeIgniter\r
- * @author             ExpressionEngine Dev Team\r
- * @copyright  Copyright (c) 2008, EllisLab, Inc.\r
- * @license            http://codeigniter.com/user_guide/license.html\r
- * @link               http://codeigniter.com\r
- * @since              Version 1.0\r
- * @filesource\r
- */\r
-\r
-// ------------------------------------------------------------------------\r
-\r
-/**\r
- * CodeIgniter XML Helpers\r
- *\r
- * @package            CodeIgniter\r
- * @subpackage Helpers\r
- * @category   Helpers\r
- * @author             ExpressionEngine Dev Team\r
- * @link               http://codeigniter.com/user_guide/helpers/xml_helper.html\r
- */\r
-\r
-// ------------------------------------------------------------------------\r
-\r
-/**\r
- * Convert Reserved XML characters to Entities\r
- *\r
- * @access     public\r
- * @param      string\r
- * @return     string\r
- */    \r
-if ( ! function_exists('xml_convert'))\r
-{\r
-       function xml_convert($str)\r
-       {\r
-               $temp = '__TEMP_AMPERSANDS__';\r
-\r
-               // Replace entities to temporary markers so that \r
-               // ampersands won't get messed up\r
-               $str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);\r
-               $str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);\r
-       \r
-               $str = str_replace(array("&","<",">","\"", "'", "-"),\r
-                                                  array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),\r
-                                                  $str);\r
-\r
-               // Decode the temp markers back to entities             \r
-               $str = preg_replace("/$temp(\d+);/","&#\\1;",$str);\r
-               $str = preg_replace("/$temp(\w+);/","&\\1;", $str);\r
-               \r
-               return $str;\r
-       }\r
-}\r
-\r
-\r
-/* End of file xml_helper.php */\r
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * CodeIgniter
+ *
+ * An open source application development framework for PHP 4.3.2 or newer
+ *
+ * @package            CodeIgniter
+ * @author             ExpressionEngine Dev Team
+ * @copyright  Copyright (c) 2008, EllisLab, Inc.
+ * @license            http://codeigniter.com/user_guide/license.html
+ * @link               http://codeigniter.com
+ * @since              Version 1.0
+ * @filesource
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * CodeIgniter XML Helpers
+ *
+ * @package            CodeIgniter
+ * @subpackage Helpers
+ * @category   Helpers
+ * @author             ExpressionEngine Dev Team
+ * @link               http://codeigniter.com/user_guide/helpers/xml_helper.html
+ */
+
+// ------------------------------------------------------------------------
+
+/**
+ * Convert Reserved XML characters to Entities
+ *
+ * @access     public
+ * @param      string
+ * @return     string
+ */    
+if ( ! function_exists('xml_convert'))
+{
+       function xml_convert($str)
+       {
+               $temp = '__TEMP_AMPERSANDS__';
+
+               // Replace entities to temporary markers so that 
+               // ampersands won't get messed up
+               $str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
+               $str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);
+       
+               $str = str_replace(array("&","<",">","\"", "'", "-"),
+                                                  array("&amp;", "&lt;", "&gt;", "&quot;", "&#39;", "&#45;"),
+                                                  $str);
+
+               // Decode the temp markers back to entities             
+               $str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
+               $str = preg_replace("/$temp(\w+);/","&\\1;", $str);
+               
+               return $str;
+       }
+}
+
+
+/* End of file xml_helper.php */
 /* Location: ./system/helpers/xml_helper.php */
\ No newline at end of file