Make WordPress Core

Ticket #44564: patch.diff

File patch.diff, 495 bytes (added by Fleuv, 7 years ago)

Wrap the output of wp_make_link_relative() with trailingslashit() this also does SEO adding a slash to a links without a slash.

  • trunk/src/wp-includes/formatting.php

     
    43734373 * @return string Absolute path.
    43744374 */
    43754375function wp_make_link_relative( $link ) {
    4376         return preg_replace( '|^(https?:)?//[^/]+(/?.*)|i', '$2', $link );
     4376        return trailingslashit(preg_replace( '|^(https?:)?//[^/]+(/?.*)|i', '$2', $link ));
    43774377}
    43784378
    43794379/**