Code

updated templates
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Mar 2010 13:40:40 +0000 (13:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Mar 2010 13:40:40 +0000 (13:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16954 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc

index 53558553fae044c84ed4116e201c9be8460eda0b..dec99bbc2122eb6c8a77f587efdf0aae06637eae 100644 (file)
@@ -3629,6 +3629,19 @@ function image($path, $action= "", $title= "", $align= "middle")
   }
 }
 
+/*! \brief    Encodes a complex string to be useable in HTML posts.
+ */
+function postEncode($str)
+{
+  return(preg_replace("/=/","_", base64_encode($str)));
+}
+
+/*! \brief    Decodes a string encoded by postEncode
+ */
+function postDecode($str)
+{
+  return(base64_decode(preg_replace("/_/","=", $str)));
+}
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>