WordPress.org

Making WordPress.org

Changeset 5581


Ignore:
Timestamp:
06/15/17 23:16:36 (4 months ago)
Author:
coffee2code
Message:

developer.wordpress.org: In link_internal_element(), sanitize the slug used for functions since it is the fallback option and may in fact be a malformed reference.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php

    r5579 r5581  
    181181                $link = '<a href="' . 
    182182                        get_post_type_archive_link( 'wp-parser-hook' ) . 
    183                         sanitize_key( html_entity_decode( $hook[1] ) ) . '/' . 
     183                        sanitize_title_with_dashes( html_entity_decode( $hook[1] ) ) . '/' . 
    184184                        '">' . esc_html( $link ) . '</a>'; 
    185185            } 
     
    206206            $link = '<a href="' . 
    207207                    get_post_type_archive_link( 'wp-parser-function' ) . 
    208                     str_replace( '()', '', $link ) . 
     208                    sanitize_title_with_dashes( html_entity_decode( $link ) ) . 
    209209                    '">' . esc_html( $link ) . '</a>'; 
    210210        } 
Note: See TracChangeset for help on using the changeset viewer.