Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#2283 closed defect (bug) (fixed)

Profile fields (drop down) problem with apostrophe

Reported by: gian-ava Owned by:
Milestone: 1.5 Priority: normal
Severity: Version:
Component: Extended Profile Keywords: 2nd-opinion close
Cc:

Description

When save profile fields dropdown, if in the options there is an apostrophe, the apostrophe generates a backslash before itself.

Example:
It's never enough

Becomes:
It/'s never enough

It affects both the Profile Fields UI, both backend and frontend (missing a stripslashes call).

Change History (13)

#1 @mrmaz
10 years ago

  • Priority changed from major to normal

I am going to fix the output, but the real question is why is the apostrophe being escaped before it is saved?

#2 @mrmaz
10 years ago

(In [2911]) refs #2283, fixed output but needs a deeper look

#3 @DJPaul
10 years ago

To prevent SQL injections?

#4 @r-a-y
9 years ago

  • Keywords 2nd-opinion close added; Profile fields problem apostrophe removed

#5 @boonebgorges
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3499]) Adds stripslashes to values in bp_the_profile_field_options(). Fixes #2283 (trunk)

#6 @boonebgorges
9 years ago

(In [3500]) Adds stripslashes to values in bp_the_profile_field_options(). Fixes #2283 (branch)

#7 @boonebgorges
9 years ago

This was an issue not only for the dropdown, but also for radio buttons and for checkboxes. It applied not just to the text display, but also to the value of the input, so that those field values weren't saving correctly. This seemed serious enough to sneak a fix into the 1.2 branch as well.

#8 @DJPaul
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The same type of problem also occurs on the xprofile 'edit field' admin screen; render_admin_form_children().

#9 @boonebgorges
9 years ago

Good catch, Paul.

#10 @boonebgorges
9 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [3509]) Adds stripslashes to option values on profile field admin. Fixes #2283 (trunk)

#11 @boonebgorges
9 years ago

(In [3510]) Adds stripslashes to option values on profile field admin. Fixes #2283 (1.2 branch)

#12 @nacin
9 years ago

Shouldn't it be stored without slashes, rather than needing to strip them alway on output?

#13 @DJPaul
9 years ago

nacin, yes; see #2776

Note: See TracTickets for help on using tickets.