Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/02/2024 05:52:42 PM (12 months ago)
Author:
espellcaste
Message:

Use wp_strip_all_tags instead of strip_tags.

Props imath
Closes https://github.com/buddypress/buddypress/pull/306
See #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-template.php

    r13890 r13897  
    817817        }
    818818
    819         $totalLength = mb_strlen( strip_tags( $ending ) );
     819        $totalLength = mb_strlen( wp_strip_all_tags( $ending ) );
    820820        $openTags    = array();
    821821        $truncate    = '';
     
    867867        // Strip HTML tags if necessary.
    868868        if ( ! empty( $r['strip_tags'] ) ) {
    869             $text = strip_tags( $text );
     869            $text = wp_strip_all_tags( $text );
    870870        }
    871871
     
    30593059        // Use component name on member pages.
    30603060        } else {
    3061             $bp_title_parts = array_merge( $bp_title_parts, array_map( 'strip_tags', array(
     3061            $bp_title_parts = array_merge( $bp_title_parts, array_map( 'wp_strip_all_tags', array(
    30623062                $displayed_user_name,
    30633063                $component_name,
     
    30663066            // If we have a subnav name, add it separately for localization.
    30673067            if ( ! empty( $component_subnav_name ) ) {
    3068                 $bp_title_parts[] = strip_tags( $component_subnav_name );
     3068                $bp_title_parts[] = wp_strip_all_tags( $component_subnav_name );
    30693069            }
    30703070        }
Note: See TracChangeset for help on using the changeset viewer.