summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnybody2018-10-16 08:14:25 (GMT)
committerRobin Ingelbrecht2018-10-16 08:14:25 (GMT)
commit259af7604f0b1d53143b493159eaa9e044e121e2 (patch)
tree1d297ed6dca6b843b50aee71b71ece05c01cec95
parentd0f5ca17b9ec7a13e5dbd7870292071ee2986073 (diff)
Issue #2947849 by Anybody: Support local / relative URLS
-rw-r--r--src/Plugin/video_embed_field/Provider/Html5.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Plugin/video_embed_field/Provider/Html5.php b/src/Plugin/video_embed_field/Provider/Html5.php
index 06cf1b6..60f133d 100644
--- a/src/Plugin/video_embed_field/Provider/Html5.php
+++ b/src/Plugin/video_embed_field/Provider/Html5.php
@@ -188,7 +188,7 @@ class Html5 extends ProviderPluginBase {
* {@inheritdoc}
*/
public static function getIdFromInput($input) {
- $pattern = "/\b(http|https):\/\/.*(mp4|ogg|webm)\b/";
+ $pattern = "/(?:(\/)|(?:(?|http|https|ftp)(?|\/\/))).*(mp4|ogg|webm)/";
$matches = array();
preg_match($pattern, $input, $matches);