summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ab37dc)
raw | patch | inline | side by side (parent: 0ab37dc)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 28 Jun 2007 12:58:43 +0000 (12:58 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 28 Jun 2007 12:58:43 +0000 (12:58 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6732 594d385d-05f5-0310-b6e9-bd551577e9d8
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index b6e07403a92ded65d5e59c297a95b0f6d9fb972b..ec2d4bcdc723eb28e0baee048b7810c4567b915c 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
function prepare4mailbody($string)
{
- $string = urlencode(html_entity_decode($string));
-
- $from = array("/\#/" , "/&/" ,"/(\'|\")/" ,"/\+/");
- $to = array("::" , "%26" ,"%22" ," ");
+ $string = html_entity_decode($string);
+
+ $from = array(
+ "/%/",
+ "/ /",
+ "/\n/",
+ "/\r/",
+ "/!/",
+ "/#/",
+ "/*/",
+ "/\//",
+ "/</",
+ "/>/",
+ "/?/",
+ "/(\'|\")/");
+
+ $to = array(
+ "%25",
+ "%20",
+ "%0A",
+ "%0D",
+ "%21",
+ "%23",
+ "%2A",
+ "%2F",
+ "%3C",
+ "%3E",
+ "%3F",
+ "%22");
$string = preg_replace($from,$to,$string);