aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-08 07:03:25 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-08 07:03:25 -0700
commit9a6a60a9c1c7f781790849173e309ac0664d7b35 (patch)
treeb0597e8aeaa20d6ded493b2c053e3e976a53115a /boot.php
parente98aaa3cbd2c14ab2f1b8534c8c63708086fe0f1 (diff)
downloadvolse-hubzilla-9a6a60a9c1c7f781790849173e309ac0664d7b35.tar.gz
volse-hubzilla-9a6a60a9c1c7f781790849173e309ac0664d7b35.tar.bz2
volse-hubzilla-9a6a60a9c1c7f781790849173e309ac0664d7b35.zip
mucho progress on notifier, email style dfrn url's
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php47
1 files changed, 46 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 9f825ddfd..fab44a7a4 100644
--- a/boot.php
+++ b/boot.php
@@ -311,4 +311,49 @@ function notice($s) {
$_SESSION['sysmsg'] .= $s;
-}} \ No newline at end of file
+}}
+
+
+if(! function_exists('xmlify')) {
+function xmlify($str) {
+ $buffer = '';
+
+ for($x = 0; $x < strlen($str); $x ++) {
+ $char = $str[$x];
+
+ switch( $char ) {
+
+ case "\r" :
+ break;
+ case "&" :
+ $buffer .= '&amp;';
+ break;
+ case "'" :
+ $buffer .= '&apos;';
+ break;
+
+ case "\"" :
+ $buffer .= '&quot;';
+ break;
+ case '<' :
+ $buffer .= '&lt;';
+ break;
+ case '>' :
+ $buffer .= '&gt;';
+ break;
+ case "\n" :
+ $buffer .= ' ';
+ break;
+ default :
+ $buffer .= $char;
+ break;
+ }
+ }
+ $buffer = trim($buffer);
+ return($buffer);
+}}
+
+
+function hex2bin($s) {
+ return(pack("H*",$s));
+} \ No newline at end of file