Created
April 26, 2019 10:04
-
-
Save ryandemmer/477f81832e7bb306417bea088443d51b to your computer and use it in GitHub Desktop.
url processing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$text = preg_replace('#(href|src)="([^:"]*)("|(?:(?:%20|\s|\+)[^"]*"))#', '$1="'/$2$3', $text); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment