Statusnet/Twitter URL could be cut in the smart shortening function
This commit is contained in:
@@ -451,6 +451,9 @@ function statusnet_shortenmsg($b, $max_char) {
|
||||
while (strpos($msg, " ") !== false)
|
||||
$msg = str_replace(" ", " ", $msg);
|
||||
|
||||
// Removing URLs
|
||||
$msg = preg_replace('/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/i', "", $msg);
|
||||
|
||||
$msg = trim($msg);
|
||||
|
||||
$link = '';
|
||||
|
||||
@@ -310,6 +310,9 @@ function twitter_shortenmsg($b) {
|
||||
while (strpos($msg, " ") !== false)
|
||||
$msg = str_replace(" ", " ", $msg);
|
||||
|
||||
// Removing URLs
|
||||
$msg = preg_replace('/(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/i', "", $msg);
|
||||
|
||||
$msg = trim($msg);
|
||||
|
||||
$link = '';
|
||||
|
||||
Reference in New Issue
Block a user