]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
remote comments working now
[friendica.git] / boot.php
index 9dce8689e597c7f2d940ac60c7e939eec02d19e2..02c37a93f126b91da56851b954059514467adf23 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -22,6 +22,7 @@ class App {
        public  $profile;
        public  $user;
        public  $cid;
+       public  $contact;
        public  $content;
        public  $error = false;
        public  $cmd;
@@ -190,7 +191,9 @@ function notags($string) {
 // The PHP built-in tag escape function has traditionally been buggy
 if(! function_exists('escape_tags')) {
 function escape_tags($string) {
-       return(str_replace(array("<",">","&"), array('&lt;','&gt;','&amp;'), $string));
+       return(str_replace(
+               array('&', '"', "'", '<', '>'), 
+               array('&amp;', '&quot;', '&#39;', '&lt;', '&gt;'), $string));
 }}
 
 if(! function_exists('login')) {
@@ -367,6 +370,11 @@ function xmlify($str) {
        return($buffer);
 }}
 
+function unxmlify($s) {
+       $ret = str_replace('&amp;','&', $s);
+       $ret = str_replace(array('&lt;','&gt;','&quot;','&apos;'),array('<','>','"',"'"),$ret);
+       return $ret;    
+}
 
 function hex2bin($s) {
        return(pack("H*",$s));
@@ -422,4 +430,16 @@ function paginate(&$a) {
                $o .= '</div>'."\r\n";
        }
        return $o;
-}
\ No newline at end of file
+}
+
+function expand_acl($s) {
+
+       if(strlen($s)) {
+               $a = explode('<',$s);
+               for($x = 0; $x < count($a); $x ++) {
+                       $a[$x] = intval(str_replace(array('<','>'),array('',''),$a[$x]));
+               }
+               return $a;
+       }
+       return array();
+}