Compare commits
No commits in common. "6d24cd01399035311428663bbccb339c54ed2e86" and "237539501bb56581d0936fe312f5a2c77073cb5e" have entirely different histories.
6d24cd0139
...
237539501b
|
|
@ -41,7 +41,11 @@ class TelegramLinkFixerExtension extends Minz_Extension
|
|||
}
|
||||
|
||||
// First try: Look for Telegraph link with "Telegraph" text
|
||||
if (preg_match('/href="(https:\/\/telegra\.ph\/[^"]+)"/i', $description, $matches)) {
|
||||
if (preg_match('/href="(https:\/\/telegra\.ph\/[^"]+)"[^>]*>Telegraph</i', $description, $matches)) {
|
||||
$telegraphLink = $matches[1];
|
||||
}
|
||||
// Second try: Look for any Telegraph link in the first paragraph
|
||||
else if (preg_match('/<p>.*?<a[^>]*?href="(https:\/\/telegra\.ph\/[^"]+)"[^>]*>/i', $description, $matches)) {
|
||||
$telegraphLink = $matches[1];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue