<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][13897] trunk/src: Use `wp_strip_all_tags` instead of `strip_tags`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/13897">13897</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/13897","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>espellcaste</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-06-02 17:52:42 +0000 (Sun, 02 Jun 2024)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Use `wp_strip_all_tags` instead of `strip_tags`.
Props imath
Closes https://github.com/buddypress/buddypress/pull/306
See <a href="http://buddypress.trac.wordpress.org/ticket/7228">#7228</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpactivitybpactivityfunctionsphp">trunk/src/bp-activity/bp-activity-functions.php</a></li>
<li><a href="#trunksrcbpactivitybpactivitytemplatephp">trunk/src/bp-activity/bp-activity-template.php</a></li>
<li><a href="#trunksrcbpactivityclassesclassbpactivityactivityphp">trunk/src/bp-activity/classes/class-bp-activity-activity.php</a></li>
<li><a href="#trunksrcbpactivityclassesclassbpactivityfeedphp">trunk/src/bp-activity/classes/class-bp-activity-feed.php</a></li>
<li><a href="#trunksrcbpcorebpcoretemplatephp">trunk/src/bp-core/bp-core-template.php</a></li>
<li><a href="#trunksrcbpcoreclassesclassbpmediaextractorphp">trunk/src/bp-core/classes/class-bp-media-extractor.php</a></li>
<li><a href="#trunksrcbpgroupsscreenssinglerequestmembershipphp">trunk/src/bp-groups/screens/single/request-membership.php</a></li>
<li><a href="#trunksrcbpmembersbpmembersfunctionsphp">trunk/src/bp-members/bp-members-functions.php</a></li>
<li><a href="#trunksrcbpmembersbpmemberstemplatephp">trunk/src/bp-members/bp-members-template.php</a></li>
<li><a href="#trunksrcbpmessagesbpmessagestemplatephp">trunk/src/bp-messages/bp-messages-template.php</a></li>
<li><a href="#trunksrcbptemplatesbpnouveauincludesmessagesajaxphp">trunk/src/bp-templates/bp-nouveau/includes/messages/ajax.php</a></li>
<li><a href="#trunksrcbpxprofileclassesclassbpxprofilefieldtypeurlphp">trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpactivitybpactivityfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/bp-activity-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/bp-activity-functions.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-activity/bp-activity-functions.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -172,7 +172,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $activity = new BP_Activity_Activity( $activity_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Try to find mentions.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $usernames = bp_activity_find_mentions( strip_tags( $activity->content ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $usernames = bp_activity_find_mentions( wp_strip_all_tags( $activity->content ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Still empty? Stop now.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $usernames ) ) {
</span></span></pre></div>
<a id="trunksrcbpactivitybpactivitytemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/bp-activity-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/bp-activity-template.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-activity/bp-activity-template.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3204,7 +3204,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $value The excerpt for the latest update.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $user_id ID of the queried user.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', trim( strip_tags( bp_create_excerpt( $update['content'], bp_activity_get_excerpt_length() ) ) ), $user_id );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $latest_update = apply_filters( 'bp_get_activity_latest_update_excerpt', wp_strip_all_tags( bp_create_excerpt( $update['content'], bp_activity_get_excerpt_length() ) ), $user_id );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $latest_update = sprintf(
</span><span class="cx" style="display: block; padding: 0 10px"> '%s <a href="%s">%s</a>',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4195,7 +4195,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $content = explode( '<span', $content );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $title = strip_tags( ent2ncr( trim( convert_chars( $content[0] ) ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $title = wp_strip_all_tags( ent2ncr( trim( convert_chars( $content[0] ) ) ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ':' === substr( $title, -1 ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $title = substr( $title, 0, -1 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4202,7 +4202,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'activity_update' === $activities_template->activity->type ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $title .= ': ' . strip_tags( ent2ncr( trim( convert_chars( bp_create_excerpt( $activities_template->activity->content, 70, array( 'ending' => " […]" ) ) ) ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $title .= ': ' . wp_strip_all_tags( ent2ncr( trim( convert_chars( bp_create_excerpt( $activities_template->activity->content, 70, array( 'ending' => " […]" ) ) ) ) ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcbpactivityclassesclassbpactivityactivityphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/classes/class-bp-activity-activity.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/classes/class-bp-activity-activity.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-activity/classes/class-bp-activity-activity.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1880,7 +1880,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> for ( $i = 0, $count = count( $activities ); $i < $count; ++$i ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $title = explode( '<span', $activities[$i]['content'] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $activity_feed[$i]['title'] = trim( strip_tags( $title[0] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $activity_feed[$i]['title'] = wp_strip_all_tags( $title[0] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $activity_feed[$i]['link'] = $activities[$i]['primary_link'];
</span><span class="cx" style="display: block; padding: 0 10px"> $activity_feed[$i]['description'] = @sprintf( $activities[$i]['content'], '' );
</span><span class="cx" style="display: block; padding: 0 10px"> $activity_feed[$i]['pubdate'] = $activities[$i]['date_recorded'];
</span></span></pre></div>
<a id="trunksrcbpactivityclassesclassbpactivityfeedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/classes/class-bp-activity-feed.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/classes/class-bp-activity-feed.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-activity/classes/class-bp-activity-feed.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,11 +200,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function setup_properties() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->id = sanitize_title( $this->id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->title = strip_tags( $this->title );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->title = wp_strip_all_tags( $this->title );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->link = esc_url_raw( $this->link );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->description = strip_tags( $this->description );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->description = wp_strip_all_tags( $this->description );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->ttl = (int) $this->ttl;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->update_period = strip_tags( $this->update_period );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->update_period = wp_strip_all_tags( $this->update_period );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->update_frequency = (int) $this->update_frequency;
</span><span class="cx" style="display: block; padding: 0 10px"> $this->activity_args = bp_parse_args(
</span><span class="cx" style="display: block; padding: 0 10px"> $this->activity_args,
</span></span></pre></div>
<a id="trunksrcbpcorebpcoretemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/bp-core-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/bp-core-template.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-core/bp-core-template.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -816,7 +816,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $text;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $totalLength = mb_strlen( strip_tags( $ending ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $totalLength = mb_strlen( wp_strip_all_tags( $ending ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> $openTags = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $truncate = '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -866,7 +866,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // Strip HTML tags if necessary.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $r['strip_tags'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $text = strip_tags( $text );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $text = wp_strip_all_tags( $text );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Remove links if necessary.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3058,7 +3058,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Use component name on member pages.
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $bp_title_parts = array_merge( $bp_title_parts, array_map( 'strip_tags', array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $bp_title_parts = array_merge( $bp_title_parts, array_map( 'wp_strip_all_tags', array(
</ins><span class="cx" style="display: block; padding: 0 10px"> $displayed_user_name,
</span><span class="cx" style="display: block; padding: 0 10px"> $component_name,
</span><span class="cx" style="display: block; padding: 0 10px"> ) ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3065,7 +3065,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If we have a subnav name, add it separately for localization.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $component_subnav_name ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $bp_title_parts[] = strip_tags( $component_subnav_name );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $bp_title_parts[] = wp_strip_all_tags( $component_subnav_name );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcbpcoreclassesclassbpmediaextractorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/classes/class-bp-media-extractor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/classes/class-bp-media-extractor.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-core/classes/class-bp-media-extractor.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -932,7 +932,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function strip_markup( $richtext ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $plaintext = strip_shortcodes( html_entity_decode( strip_tags( $richtext ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $plaintext = strip_shortcodes( html_entity_decode( wp_strip_all_tags( $richtext ) ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the generated plain text version of the content passed to the extractor.
</span></span></pre></div>
<a id="trunksrcbpgroupsscreenssinglerequestmembershipphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/screens/single/request-membership.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/screens/single/request-membership.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-groups/screens/single/request-membership.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +51,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the member added a message to their request include it into the request arguments.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_POST['group-request-membership-comments'] ) && $_POST['group-request-membership-comments'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $request_args['content'] = strip_tags( wp_unslash( $_POST['group-request-membership-comments'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $request_args['content'] = wp_strip_all_tags( wp_unslash( $_POST['group-request-membership-comments'] ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! groups_send_membership_request( $request_args ) ) {
</span></span></pre></div>
<a id="trunksrcbpmembersbpmembersfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-members/bp-members-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-members/bp-members-functions.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-members/bp-members-functions.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -514,7 +514,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'bp_core_get_user_displayname', get_the_author_meta( 'display_name', $user_id ), $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-add_filter( 'bp_core_get_user_displayname', 'strip_tags', 1 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+add_filter( 'bp_core_get_user_displayname', 'wp_strip_all_tags', 1 );
</ins><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_core_get_user_displayname', 'trim' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_core_get_user_displayname', 'stripslashes' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_core_get_user_displayname', 'esc_html' );
</span></span></pre></div>
<a id="trunksrcbpmembersbpmemberstemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-members/bp-members-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-members/bp-members-template.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-members/bp-members-template.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1012,7 +1012,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_get_member_name', 'wp_filter_kses' );
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_get_member_name', 'stripslashes' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- add_filter( 'bp_get_member_name', 'strip_tags' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ add_filter( 'bp_get_member_name', 'wp_strip_all_tags' );
</ins><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'bp_get_member_name', 'esc_html' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1148,8 +1148,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $update['content'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $excerpt = trim( strip_tags( bp_create_excerpt( $update['content'], $length ) ) );
- $update['content'] = trim( strip_tags( $update['content'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $excerpt = wp_strip_all_tags( bp_create_excerpt( $update['content'], $length ) );
+ $update['content'] = wp_strip_all_tags( $update['content'] );
</ins><span class="cx" style="display: block; padding: 0 10px"> $update['excerpt'] = $excerpt;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $excerpt = '';
</span></span></pre></div>
<a id="trunksrcbpmessagesbpmessagestemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-messages/bp-messages-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-messages/bp-messages-template.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-messages/bp-messages-template.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -205,7 +205,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $value Excerpt of the current thread in the loop.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return apply_filters( 'bp_get_message_thread_excerpt', strip_tags( bp_create_excerpt( $messages_template->thread->last_message_content, 75 ) ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return apply_filters( 'bp_get_message_thread_excerpt', wp_strip_all_tags( bp_create_excerpt( $messages_template->thread->last_message_content, 75 ) ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcbptemplatesbpnouveauincludesmessagesajaxphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-templates/bp-nouveau/includes/messages/ajax.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-templates/bp-nouveau/includes/messages/ajax.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-templates/bp-nouveau/includes/messages/ajax.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -502,7 +502,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $_POST['js_thread'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $thread->thread = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'id' => bp_get_the_thread_id(),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'subject' => strip_tags( bp_get_the_thread_subject() ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'subject' => wp_strip_all_tags( bp_get_the_thread_subject() ),
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_array( $thread_template->thread->recipients ) ) {
</span></span></pre></div>
<a id="trunksrcbpxprofileclassesclassbpxprofilefieldtypeurlphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php 2024-06-02 17:45:18 UTC (rev 13896)
+++ trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-url.php 2024-06-02 17:52:42 UTC (rev 13897)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -187,7 +187,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string URL converted to a link.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function display_filter( $field_value, $field_id = '' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $link = strip_tags( $field_value );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $link = wp_strip_all_tags( $field_value );
</ins><span class="cx" style="display: block; padding: 0 10px"> $no_scheme = preg_replace( '#^https?://#', '', rtrim( $link, '/' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $url_text = str_replace( $link, $no_scheme, $field_value );
</span><span class="cx" style="display: block; padding: 0 10px"> return '<a href="' . esc_url( $field_value ) . '" rel="nofollow">' . esc_html( $url_text ) . '</a>';
</span></span></pre>
</div>
</div>
</body>
</html>