removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / plugins / modifier.escape.php
diff --git a/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/modifier.escape.php b/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/modifier.escape.php
deleted file mode 100644 (file)
index dc5ebc6..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php\r
-/**\r
- * Smarty plugin\r
- * @package Smarty\r
- * @subpackage plugins\r
- */\r
-\r
-\r
-/**\r
- * Smarty escape modifier plugin\r
- *\r
- * Type:     modifier<br>\r
- * Name:     escape<br>\r
- * Purpose:  Escape the string according to escapement type\r
- * @link http://smarty.php.net/manual/en/language.modifier.escape.php\r
- *          escape (Smarty online manual)\r
- * @param string\r
- * @param html|htmlall|url|quotes|hex|hexentity|javascript\r
- * @return string\r
- */\r
-function smarty_modifier_escape($string, $esc_type = 'html')\r
-{\r
-    switch ($esc_type) {\r
-        case 'html':\r
-            return htmlspecialchars($string, ENT_QUOTES);\r
-\r
-        case 'htmlall':\r
-            return htmlentities($string, ENT_QUOTES);\r
-\r
-        case 'url':\r
-            return urlencode($string);\r
-\r
-        case 'quotes':\r
-            // escape unescaped single quotes\r
-            return preg_replace("%(?<!\\\\)'%", "\\'", $string);\r
-\r
-               case 'hex':\r
-                       // escape every character into hex\r
-                       $return = '';\r
-                       for ($x=0; $x < strlen($string); $x++) {\r
-                               $return .= '%' . bin2hex($string[$x]);\r
-                       }\r
-                       return $return;\r
-            \r
-               case 'hexentity':\r
-                       $return = '';\r
-                       for ($x=0; $x < strlen($string); $x++) {\r
-                               $return .= '&#x' . bin2hex($string[$x]) . ';';\r
-                       }\r
-                       return $return;\r
-\r
-        case 'javascript':\r
-            // escape quotes and backslashes and newlines\r
-            return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n'));\r
-\r
-        default:\r
-            return $string;\r
-    }\r
-}\r
-\r
-/* vim: set expandtab: */\r
-\r
-?>\r