[buddypress-trac] [BuddyPress Trac] #6081: Slashes in Group description on Profile Administration screen
    buddypress-trac 
    noreply at wordpress.org
       
    Sun Jun 28 15:52:10 UTC 2015
    
    
  
#6081: Slashes in Group description on Profile Administration screen
----------------------------------+------------------
 Reporter:  imath                 |       Owner:
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  2.4
Component:  Component - XProfile  |     Version:
 Severity:  major                 |  Resolution:
 Keywords:  has-patch             |
----------------------------------+------------------
Changes (by DJPaul):
 * keywords:  needs-patch good-first-bug => has-patch
 * priority:  low => normal
 * severity:  minor => major
 * milestone:  Future Release => 2.4
Comment:
 Okay, this was fun. Maybe not a good-first-bug due to its complexity, but
 @mahype and I had fun exploring this issue at Wordcamp Europe contributor
 day. :)
 1) Patch adds filters to parts of the xprofile wp-admin templates so we're
 running group description and name through the same output filters that
 are used in the front-end template parts (for stripslashes).
 2) This change revealed another bug where we are storing slashes in the
 database (this is a known issue and we have somewhere a very old ticket),
 but in this case, after applying the fix in 1), editing a profile group
 name or description multiple times would show the extra slashes again in
 the templates (only stripping the first slash).
 So the patch adds a stripslashes to profile group name and description
 before_save filters to fix the root issue.
 Keeping the existing on-display stripslashes maintains backwards
 compatibility.
 3) Which revealed a fun bug where, if you save a profile group without
 changing *any* details, it didn't work and we threw an error. It looks
 like someone misinterpreted the return values of WPDB's `query` and
 `get_results` functions. So this was corrected.
 No unit tests, but it's now time for a siesta. :)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6081#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
    
    
More information about the buddypress-trac
mailing list