diff --git a/src/Misd/Linkify/Linkify.php b/src/Misd/Linkify/Linkify.php index 0e3c9e6..9a574d2 100644 --- a/src/Misd/Linkify/Linkify.php +++ b/src/Misd/Linkify/Linkify.php @@ -164,7 +164,11 @@ protected function linkifyUrls($text, $options = array('attr' => '')) $pattern = "~^(ht|f)tps?://~"; if (0 === preg_match($pattern, $match[0])) { - $match[0] = 'http://' . $match[0]; + if (array_key_exists('require_scheme', $options) && $options['require_scheme']) { + return $caption; + } else { + $match[0] = 'http://' . $match[0]; + } } if (isset($options['callback'])) {