Making WordPress.org

Changeset 11669


Ignore:
Timestamp:
03/12/2022 12:45:19 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Make, Trac Notifications: Properly encode ampersand in component names.

Follow-up to [7664], [11668].

See #6182.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-components.php

    r11668 r11669  
    325325        }
    326326
     327        $component = str_replace( '&', '&', $post->post_title );
     328
    327329        ob_start();
    328330
    329331        if ( ! is_singular() ) {
    330             $this->ticket_table( $post->post_title );
     332            $this->ticket_table( $component );
    331333            return ob_get_clean();
    332334        }
     
    398400        }
    399401
    400         $this->ticket_table( $post->post_title );
    401 
    402         $this->trac_content( $post->post_title );
     402        $this->ticket_table( $component );
     403
     404        $this->trac_content( $component );
    403405
    404406        echo '<h3>Help maintain this component</h3>';
     
    427429        echo "<strong>Want to help? Start following this component!</strong> <a href='/{$this->trac}/notifications/'>Adjust your notifications here</a>. Feel free to dig into any ticket." . "\n\n";
    428430
    429         $followers = $this->api->get_component_followers( $post->post_title );
     431        $followers = $this->api->get_component_followers( $component );
    430432        if ( $followers ) {
    431433            $followers = "'" . implode( "', '", esc_sql( $followers ) ) . "'";
     
    681683        }
    682684
    683         $component = $post->post_title;
     685        $component = str_replace( '&amp;', '&', $post->post_title );
     686
    684687        $history = $this->api->get_component_history( $component );
    685688
Note: See TracChangeset for help on using the changeset viewer.