Skip to content

Commit

Permalink
fix: adds whitelisted websites among the image urls to replace
Browse files Browse the repository at this point in the history
  • Loading branch information
selul committed Feb 7, 2019
1 parent 824acdc commit bfb016e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/app_replacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ function ( $value ) {
* @return bool Either we can replace this url or not.
*/
public function can_replace_url( $url ) {

if ( ! is_string( $url ) ) {
return false; // @codeCoverageIgnore
}
Expand All @@ -276,8 +277,7 @@ public function can_replace_url( $url ) {
if ( ! isset( $url['host'] ) ) {
return false;
}

return isset( $this->possible_sources[ $url['host'] ] );
return isset( $this->possible_sources[ $url['host'] ] ) || isset( $this->allowed_sources[ $url['host'] ] );
}

/**
Expand Down

0 comments on commit bfb016e

Please sign in to comment.