<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[BuddyPress] [2663] trunk: Fixes #1905</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2663</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-02-11 11:17:32 +0000 (Thu, 11 Feb 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes #1905</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivitynotificationsphp">trunk/bp-activity/bp-activity-notifications.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsfiltersphp">trunk/bp-groups/bp-groups-filters.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsnotificationsphp">trunk/bp-groups/bp-groups-notifications.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivitynotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-notifications.php (2662 => 2663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-notifications.php        2010-02-11 11:03:57 UTC (rev 2662)
+++ trunk/bp-activity/bp-activity-notifications.php        2010-02-11 11:17:32 UTC (rev 2663)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> To view and respond to the message, log in and visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), $poster_name, wp_filter_kses( stripslashes_deep($content) ), $message_link );
</del><ins>+', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes($content) ), $message_link );
</ins><span class="cx">
</span><span class="cx">                         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> To view your original update and all comments, log in and visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), $poster_name, wp_filter_kses( stripslashes_deep( $content ) ), $thread_link );
</del><ins>+', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes( $content ) ), $thread_link );
</ins><span class="cx">
</span><span class="cx">                 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx"> To view the original activity, your comment and all replies, log in and visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), $poster_name, wp_filter_kses( stripslashes_deep( $content ) ), $thread_link );
</del><ins>+', 'buddypress' ), $poster_name, bp_activity_filter_kses( stripslashes( $content ) ), $thread_link );
</ins><span class="cx">
</span><span class="cx">                 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsfiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-filters.php (2662 => 2663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-filters.php        2010-02-11 11:03:57 UTC (rev 2662)
+++ trunk/bp-groups/bp-groups-filters.php        2010-02-11 11:17:32 UTC (rev 2663)
</span><span class="lines">@@ -3,38 +3,25 @@
</span><span class="cx"> /* Apply WordPress defined filters */
</span><span class="cx"> add_filter( 'bp_get_group_description', 'wptexturize' );
</span><span class="cx"> add_filter( 'bp_get_group_description_excerpt', 'wptexturize' );
</span><del>-add_filter( 'bp_get_the_site_group_description', 'wptexturize' );
-add_filter( 'bp_get_the_site_group_description_excerpt', 'wptexturize' );
</del><span class="cx"> add_filter( 'bp_get_group_name', 'wptexturize' );
</span><del>-add_filter( 'bp_get_the_site_group_name', 'wptexturize' );
</del><span class="cx">
</span><span class="cx"> add_filter( 'bp_get_group_description', 'convert_smilies' );
</span><span class="cx"> add_filter( 'bp_get_group_description_excerpt', 'convert_smilies' );
</span><del>-add_filter( 'bp_get_the_site_group_description', 'convert_smilies' );
-add_filter( 'bp_get_the_site_group_description_excerpt', 'convert_smilies' );
</del><span class="cx">
</span><span class="cx"> add_filter( 'bp_get_group_description', 'convert_chars' );
</span><span class="cx"> add_filter( 'bp_get_group_description_excerpt', 'convert_chars' );
</span><span class="cx"> add_filter( 'bp_get_group_name', 'convert_chars' );
</span><del>-add_filter( 'bp_get_the_site_group_name', 'convert_chars' );
-add_filter( 'bp_get_the_site_group_description', 'convert_chars' );
-add_filter( 'bp_get_the_site_group_description_excerpt', 'convert_chars' );
</del><span class="cx">
</span><span class="cx"> add_filter( 'bp_get_group_description', 'wpautop' );
</span><span class="cx"> add_filter( 'bp_get_group_description_excerpt', 'wpautop' );
</span><del>-add_filter( 'bp_get_the_site_group_description', 'wpautop' );
-add_filter( 'bp_get_the_site_group_description_excerpt', 'wpautop' );
</del><span class="cx">
</span><span class="cx"> add_filter( 'bp_get_group_description', 'make_clickable' );
</span><span class="cx"> add_filter( 'bp_get_group_description_excerpt', 'make_clickable' );
</span><span class="cx">
</span><span class="cx"> add_filter( 'bp_get_group_name', 'wp_filter_kses', 1 );
</span><span class="cx"> add_filter( 'bp_get_group_permalink', 'wp_filter_kses', 1 );
</span><del>-add_filter( 'bp_get_group_description', 'wp_filter_kses', 1 );
</del><ins>+add_filter( 'bp_get_group_description', 'bp_groups_filter_kses', 1 );
</ins><span class="cx"> add_filter( 'bp_get_group_description_excerpt', 'wp_filter_kses', 1 );
</span><del>-add_filter( 'bp_get_the_site_group_name', 'wp_filter_kses', 1 );
-add_filter( 'bp_get_the_site_group_description', 'wp_filter_kses', 1 );
-add_filter( 'bp_get_the_site_group_description_excerpt', 'wp_filter_kses', 1 );
</del><span class="cx"> add_filter( 'groups_group_name_before_save', 'wp_filter_kses', 1 );
</span><span class="cx"> add_filter( 'groups_group_description_before_save', 'wp_filter_kses', 1 );
</span><span class="cx">
</span><span class="lines">@@ -51,6 +38,25 @@
</span><span class="cx"> add_filter( 'bp_get_group_total_for_member', 'bp_core_number_format' );
</span><span class="cx"> add_filter( 'bp_get_group_total_members', 'bp_core_number_format' );
</span><span class="cx">
</span><ins>+function bp_groups_filter_kses( $content ) {
+        global $allowedtags;
+
+        $groups_allowedtags = $allowedtags;
+        $groups_allowedtags['a']['class'] = array();
+        $groups_allowedtags['img'] = array();
+        $groups_allowedtags['img']['src'] = array();
+        $groups_allowedtags['img']['alt'] = array();
+        $groups_allowedtags['img']['class'] = array();
+        $groups_allowedtags['img']['width'] = array();
+        $groups_allowedtags['img']['height'] = array();
+        $groups_allowedtags['img']['class'] = array();
+        $groups_allowedtags['img']['id'] = array();
+        $groups_allowedtags['code'] = array();
+
+        $groups_allowedtags = apply_filters( 'bp_groups_filter_kses', $groups_allowedtags );
+        return wp_kses( $content, $groups_allowedtags );
+}
+
</ins><span class="cx"> /**** Filters for group forums ****/
</span><span class="cx">
</span><span class="cx"> function groups_add_forum_privacy_sql() {
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsnotificationsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-notifications.php (2662 => 2663)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-notifications.php        2010-02-11 11:03:57 UTC (rev 2662)
+++ trunk/bp-groups/bp-groups-notifications.php        2010-02-11 11:17:32 UTC (rev 2663)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> To view the group: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), stripslashes( $group->name ), $group_link );
</del><ins>+', 'buddypress' ), $group->name, $group_link );
</ins><span class="cx">
</span><span class="cx">                 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">
</span><span class="cx">         // Set up and send the message
</span><span class="cx">         $to = $ud->user_email;
</span><del>-        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), stripslashes( $group->name ) );
</del><ins>+        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
</ins><span class="cx">
</span><span class="cx"> $message = sprintf( __(
</span><span class="cx"> '%s wants to join the group "%s".
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> To view %s\'s profile: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), $requesting_user_name, stripslashes( $group->name ), $group_requests, $requesting_user_name, $profile_link );
</del><ins>+', 'buddypress' ), $requesting_user_name, $group->name, $group_requests, $requesting_user_name, $profile_link );
</ins><span class="cx">
</span><span class="cx">         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span><span class="lines">@@ -99,24 +99,24 @@
</span><span class="cx">         $to = $ud->user_email;
</span><span class="cx">
</span><span class="cx">         if ( $accepted ) {
</span><del>-                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), stripslashes( $group->name ) );
</del><ins>+                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), $group->name );
</ins><span class="cx">                 $message = sprintf( __(
</span><span class="cx"> 'Your membership request for the group "%s" has been accepted.
</span><span class="cx">
</span><span class="cx"> To view the group please login and visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), stripslashes( $group->name ), $group_link );
</del><ins>+', 'buddypress' ), $group->name, $group_link );
</ins><span class="cx">
</span><span class="cx">         } else {
</span><del>-                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), stripslashes( $group->name ) );
</del><ins>+                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), $group->name );
</ins><span class="cx">                 $message = sprintf( __(
</span><span class="cx"> 'Your membership request for the group "%s" has been rejected.
</span><span class="cx">
</span><span class="cx"> To submit another request please log in and visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), stripslashes( $group->name ), $group_link );
</del><ins>+', 'buddypress' ), $group->name, $group_link );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx">         // Set up and send the message
</span><span class="cx">         $to = $ud->user_email;
</span><span class="cx">
</span><del>-        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), stripslashes( $group->name ) );
</del><ins>+        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), $group->name );
</ins><span class="cx">
</span><span class="cx">         $message = sprintf( __(
</span><span class="cx"> 'You have been promoted to %s for the group: "%s".
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx"> To view the group please visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), $promoted_to, stripslashes( $group->name ), $group_link );
</del><ins>+', 'buddypress' ), $promoted_to, $group->name, $group_link );
</ins><span class="cx">
</span><span class="cx">         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx">                 // Set up and send the message
</span><span class="cx">                 $to = $invited_ud->user_email;
</span><span class="cx">
</span><del>-                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), stripslashes( $group->name ) );
</del><ins>+                $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), $group->name );
</ins><span class="cx">
</span><span class="cx">                 $message = sprintf( __(
</span><span class="cx"> 'One of your friends %s has invited you to the group: "%s".
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx"> To view %s\'s profile visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), $inviter_name, stripslashes( $group->name ), $invites_link, $group_link, $inviter_name, $inviter_link );
</del><ins>+', 'buddypress' ), $inviter_name, $group->name, $invites_link, $group_link, $inviter_name, $inviter_link );
</ins><span class="cx">
</span><span class="cx">                 $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx">                         // Set up and send the message
</span><span class="cx">                         $ud = bp_core_get_core_userdata( $receiver_user_id );
</span><span class="cx">                         $to = $ud->user_email;
</span><del>-                        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), stripslashes( $poster_name ), wp_filter_kses( stripslashes( $group->name ) ) );
</del><ins>+                        $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s mentioned you in the group "%s"', 'buddypress' ), stripslashes( $poster_name ), $group->name );
</ins><span class="cx">
</span><span class="cx"> $message = sprintf( __(
</span><span class="cx"> '%s mentioned you in the group "%s":
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx"> To view and respond to the message, log in and visit: %s
</span><span class="cx">
</span><span class="cx"> ---------------------
</span><del>-', 'buddypress' ), $poster_name, wp_filter_kses( stripslashes_deep( $group->name ) ), wp_filter_kses( stripslashes_deep($content) ), $message_link );
</del><ins>+', 'buddypress' ), $poster_name, $group->name, bp_groups_filter_kses( stripslashes( $content ) ), $message_link );
</ins><span class="cx">
</span><span class="cx">                         $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>