Skip to content

Commit

Permalink
fix: replacing url's with regex in <a> tags #141
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoreMihai committed Sep 16, 2019
1 parent aaf2815 commit 4b2264f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inc/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ function ( $url ) {
);

foreach ( $urls as $origin => $replace ) {
$origin = strtok ($origin, '?');
$html = preg_replace( '/(?<!\/)' . preg_quote( $origin, '/' ) . '/m', $replace, $html );
}

Expand Down

0 comments on commit 4b2264f

Please sign in to comment.