mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
improved linkification of naked text urls
This commit is contained in:
parent
1adf69a049
commit
42d66874be
3 changed files with 9 additions and 4 deletions
8
boot.php
8
boot.php
|
@ -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));
|
||||
}}
|
||||
}}
|
||||
|
||||
if(! function_exists('linkify')) {
|
||||
function linkify($s) {
|
||||
$s = preg_replace("/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $s);
|
||||
return($s);
|
||||
}}
|
Loading…
Add table
Add a link
Reference in a new issue