[FB2Bridge] Prevent Facebook link href's ending in two quotes (#831)

Additionally prevent Facebook links having two forward slashes after the hostname.
This commit is contained in:
triatic 2018-09-15 14:16:15 +01:00 committed by LogMANOriginal
parent 6688cf0c3b
commit ec60752650

View file

@ -22,7 +22,7 @@ class FB2Bridge extends BridgeAbstract {
if(is_array($matches) && count($matches) > 1) {
$link = $matches[1];
if(strpos($link, '/') === 0)
$link = self::URI . $link . '"';
$link = self::URI . substr($link, 1);
if(strpos($link, 'facebook.com/l.php?u=') !== false)
$link = urldecode(extractFromDelimiters($link, 'facebook.com/l.php?u=', '&'));
return ' href="' . $link . '"';