-
-
Notifications
You must be signed in to change notification settings - Fork 315
Description
I have a strange issue. I'm using Embed URL, a Drupal module that requires another Drupal module, Embed, that uses this library.
The URL Embed module is supposed to allow embedding content using oEmbed. It works ok with several providers but not for Twitter's tweets. After a debugging sessions, it seems the URL is not detected properly because Embed\Providers\OEmbed\Twitter::getPatterns() returns just 'https?://*.twitter.com/*'
. This pattern doesn't match the standard tweet URL like https://twitter.com/USER/status/TWEET_ID
.
The module works if I add a new pattern: 'https?://twitter.com/*'
.
However, if you go to the test URL (https://oscarotero.com/embed/demo/index.php) and type a tweet URL it seems to work. For example:
This is the tweet I was having problems to display.
So, I don't understand what is happening. It seems tweets should not be displayed because match fails, as it happening in my Durpal installation, but the test URL indeed shows the tweet. If I 'fix' the patterns, the Drupal module works ok. I'm crating a PR, but I'm not really sure If this a proper fix.