Changeset 8815 for trunk/src/bp-xprofile/bp-xprofile-filters.php
- Timestamp:
- 08/12/2014 02:16:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-filters.php
r8672 r8815 198 198 } 199 199 200 /** 201 * Filter an Extended Profile field value, and attempt to make clickable links 202 * to members search results out of them. 203 * 204 * - Not run on datebox field types 205 * - Not run on values without commas with less than 5 words 206 * - URL's are made clickable 207 * - To disable: remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 ); 208 * 209 * @since BuddyPress (1.1) 210 * 211 * @param string $field_value 212 * @param string $field_type 213 * @return string 214 */ 200 215 function xprofile_filter_link_profile_data( $field_value, $field_type = 'textbox' ) { 201 216 … … 228 243 } else { 229 244 $search_url = add_query_arg( array( 's' => urlencode( $value ) ), bp_get_members_directory_permalink() ); 230 $new_values[] = '<a href="' . $search_url. '" rel="nofollow">' . $value . '</a>';245 $new_values[] = '<a href="' . esc_url( $search_url ) . '" rel="nofollow">' . $value . '</a>'; 231 246 } 232 247 }
Note: See TracChangeset
for help on using the changeset viewer.