mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-22 04:10:15 +00:00
Statusnet/Twitter URL could be cut in the smart shortening function
This commit is contained in:
parent
81b0a1c2d0
commit
0857ae55c3
2 changed files with 6 additions and 0 deletions
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in a new issue