diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-08 07:03:25 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-08 07:03:25 -0700 |
commit | 9a6a60a9c1c7f781790849173e309ac0664d7b35 (patch) | |
tree | b0597e8aeaa20d6ded493b2c053e3e976a53115a /boot.php | |
parent | e98aaa3cbd2c14ab2f1b8534c8c63708086fe0f1 (diff) | |
download | volse-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.php | 47 |
1 files changed, 46 insertions, 1 deletions
@@ -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 .= '&'; + break; + case "'" : + $buffer .= '''; + break; + + case "\"" : + $buffer .= '"'; + break; + case '<' : + $buffer .= '<'; + break; + case '>' : + $buffer .= '>'; + 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 |