Making WordPress.org

Changeset 3653


Ignore:
Timestamp:
07/08/2016 03:11:06 PM (9 years ago)
Author:
jmdodd
Message:

Support: Use WordPress-native functions to improve escaping.

See #1544.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-codexify/wporg-bbp-codexify.php

    r3652 r3653  
    5151    public static function convert_base_wiki_link( $matches ) {
    5252        $matches[1] = preg_replace( '/[\s]+/', '', trim( $matches[1] ) );
    53         return '<a href="' . self::BASE_URI . strtr( $matches[1], ' ', '_' ) . '">' . $matches[1] . '</a>';
     53        return '<a href="' . esc_url( self::BASE_URI . strtr( $matches[1], ' ', '_' ) ) . '">' . esc_html( $matches[1] ) . '</a>';
    5454    }
    5555
     
    6363    public static function convert_vbar_wiki_link( $matches ) {
    6464        $matches[1] = preg_replace( '/[\s]+/', '_', trim( $matches[1] ) );
    65         return '<a href="' . self::BASE_URI . strtr( $matches[1], ' ', '_' ) . '">' . $matches[2] . '</a>';
     65        return '<a href="' . esc_url( self::BASE_URI . strtr( $matches[1], ' ', '_' ) ) . '">' . esc_html( $matches[2] ) . '</a>';
    6666    }
    6767} }
Note: See TracChangeset for help on using the changeset viewer.