Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
MSFTMPP-352: odburl crearance
Browse files Browse the repository at this point in the history
  • Loading branch information
grigory-catalyst authored and jamesmcq committed Mar 3, 2016
1 parent 8af80ee commit 3fb5137
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public function filter($text, array $options = array()) {
}
$odburl = get_config('local_o365', 'odburl');
if (get_config('filter_oembed', 'o365video') && !empty($odburl)) {
$odburl = preg_replace('/^https?:\/\//', '', $odburl);
$odburl = preg_replace('/\/.*/', '', $odburl);
$trimedurl = preg_replace("/-my/", "", $odburl);
$search = '/<a\s[^>]*href="(https?:\/\/)('.$odburl.'|'.$trimedurl.')\/(.*?)"(.*?)>(.*?)<\/a>/is';
$newtext = preg_replace_callback($search, 'filter_oembed_o365videocallback', $newtext);
Expand Down

0 comments on commit 3fb5137

Please sign in to comment.