Skip to content

Commit

Permalink
Merge pull request #16 from ParhamG/master
Browse files Browse the repository at this point in the history
Updated the pattern to also replace protocol-relative URLs
  • Loading branch information
ericmann committed Jun 20, 2017
2 parents 9cce8bd + 900f271 commit 2470a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/functions/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function filter( $content ) {
$url = preg_quote( $url, '#' );

$pattern = "#(\\\?[\"'])" // opening quote
. "(https?:\\\?/\\\?/{$url})?\\\?/" // domain (optional)
. "((?:https?:)?\\\?/\\\?/{$url})?\\\?/" // domain (optional)
// . "([^/](?:(?!\\1).)+)" // look for anything that's not our opening quote
. "([^/][\w\s\\\/\-\,\.]+)" // look for anything that's not our opening quote
. "\.(" . implode( '|', $manager->extensions ) . ")" // extensions
Expand Down

1 comment on commit 2470a5c

@TheLastCicada
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.... this fixed a problem I'm having right now!

Please sign in to comment.