Skip to:
Content

BuddyPress.org

Changeset 12380


Ignore:
Timestamp:
04/25/2019 02:39:08 PM (6 years ago)
Author:
boonebgorges
Message:

Nouveau: Improved escaping for activity IDs.

Merges [12378] to the 4.0 branch.

Props whyisjake.

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/src/bp-templates/bp-nouveau/js/buddypress-activity.js

    r12156 r12380  
    346346                        // Prepend a link to display all
    347347                        if ( ! i ) {
    348                             $( item ).before( '<li class="show-all"><button class="text-button" type="button" data-bp-show-comments-id="#' + activity_item.prop( 'id' ) + '/show-all/"><span class="icon dashicons dashicons-visibility" aria-hidden="true"></span> ' + BP_Nouveau.show_x_comments.replace( '%d', comment_count ) + '</button></li>' );
     348                            var activity_id = activity_item.data( 'bpActivityId' );
     349                            if ( 'undefined' !== typeof activity_id ) {
     350                                activity_id = parseInt( activity_id, 10 );
     351                                $( item ).before( '<li class="show-all"><button class="text-button" type="button" data-bp-show-comments-id="#activity-' + activity_id + '/show-all/"><span class="icon dashicons dashicons-visibility" aria-hidden="true"></span> ' + BP_Nouveau.show_x_comments.replace( '%d', comment_count ) + '</button></li>' );
     352                            }
    349353                        }
    350354                    }
Note: See TracChangeset for help on using the changeset viewer.