Skip to content

Commit

Permalink
Merge pull request #4 from AtomicSmash/development
Browse files Browse the repository at this point in the history
Fixed deprecation error within regex
  • Loading branch information
clvarley authored Jan 29, 2020
2 parents 1f0209c + 23fb8cd commit b0c29c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public function linkify( $tweet )
{

//Convert urls to <a> links
$tweet = preg_replace("/([\w]+\:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/", "<a target=\"_blank\" href=\"$1\">$1</a>", $tweet);
$tweet = preg_replace("/([\w]+\:\/\/[\w\-?&;#~=\.\/\@]+[\w\/])/", "<a target=\"_blank\" href=\"$1\">$1</a>", $tweet);

//Convert hashtags to twitter searches in <a> links
$tweet = preg_replace("/#([A-Za-z0-9\/\.]*)/", "<a target=\"_new\" href=\"http://twitter.com/search?q=$1\">#$1</a>", $tweet);
Expand Down

0 comments on commit b0c29c7

Please sign in to comment.