Skip to content

Commit

Permalink
Merge pull request #195 from Corben78/master
Browse files Browse the repository at this point in the history
Fixes youtube embeds
  • Loading branch information
Corben78 committed May 17, 2016
2 parents 4d72cef + f69d692 commit f38ebfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion news.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</p><div class="dynamiclink"><img src="{$t['url']}" alt="A thumbnail of the video for {$v['title']}"/><h4><a href="https://youtu.be/{$vid[1]}">{$v['title']}</a></h4><p>$d</p></div><p>
YOUTUBE;
$url = preg_quote($vid[0], '/');
$pattern = "/<a target=\"_blank\" href=\"https:\/\/" . $url . "\" id=\"dynamiclink_[0-9]\">https:\/\/" . $url . "<\/a>/";
$pattern = "/<a href=\"https:\/\/" . $url . "\" target=\"_blank\" rel=\"noreferrer\" id=\"dynamiclink_[0-9]\">https:\/\/" . $url . "<\/a>/";
$item['description'] = preg_replace( $pattern, $embed, $item['description'] );
}
}
Expand Down

0 comments on commit f38ebfa

Please sign in to comment.