Making WordPress.org

Ticket #2103: meta-2103.patch

File meta-2103.patch, 1.3 KB (added by SergeyBiryukov, 8 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-codexify/wporg-bbp-codexify.php

     
    4949         * @return string
    5050         */
    5151        public static function convert_base_wiki_link( $matches ) {
    52                 $matches[1] = preg_replace( '/[\s]+/', '', trim( $matches[1] ) );
    53                 return '<a href="' . esc_url( self::BASE_URI . strtr( $matches[1], ' ', '_' ) ) . '">' . esc_html( $matches[1] ) . '</a>';
     52                $path = preg_replace( '/[\s]+/', '_', trim( $matches[1] ) );
     53                return '<a href="' . esc_url( self::BASE_URI . $path ) . '">' . esc_html( $matches[1] ) . '</a>';
    5454        }
    5555
    5656        /**
     
    6161         * @return string
    6262         */
    6363        public static function convert_vbar_wiki_link( $matches ) {
    64                 $matches[1] = preg_replace( '/[\s]+/', '_', trim( $matches[1] ) );
    65                 return '<a href="' . esc_url( self::BASE_URI . strtr( $matches[1], ' ', '_' ) ) . '">' . esc_html( $matches[2] ) . '</a>';
     64                $path = preg_replace( '/[\s]+/', '_', trim( $matches[1] ) );
     65                return '<a href="' . esc_url( self::BASE_URI . $path ) . '">' . esc_html( $matches[2] ) . '</a>';
    6666        }
    6767} }
    6868