diff options
author | Friendika <info@friendika.com> | 2010-12-01 21:13:09 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-12-01 21:13:09 -0800 |
commit | 42d66874bed88753cbcf08a060c89f789f41a3ae (patch) | |
tree | f8d79a930522b934797f83a3c10c0daf9b1262c9 /boot.php | |
parent | 1adf69a04967a3829749b99c8ce663d5068748dd (diff) | |
download | volse-hubzilla-42d66874bed88753cbcf08a060c89f789f41a3ae.tar.gz volse-hubzilla-42d66874bed88753cbcf08a060c89f789f41a3ae.tar.bz2 volse-hubzilla-42d66874bed88753cbcf08a060c89f789f41a3ae.zip |
improved linkification of naked text urls
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1567,4 +1567,10 @@ function aes_encrypt($val,$ky) $enc=MCRYPT_RIJNDAEL_128; $val=str_pad($val, (16*(floor(strlen($val) / 16)+(strlen($val) % 16==0?2:1))), chr(16-(strlen($val) % 16))); return mcrypt_encrypt($enc, $key, $val, $mode, mcrypt_create_iv( mcrypt_get_iv_size($enc, $mode), MCRYPT_DEV_URANDOM)); -}}
\ No newline at end of file +}} + +if(! function_exists('linkify')) { +function linkify($s) { + $s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $s); + return($s); +}}
\ No newline at end of file |