Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#2283 closed defect (bug) (fixed)

Profile fields (drop down) problem with apostrophe

Reported by: gian-ava's profile 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
12 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
12 years ago

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

#3 @DJPaul
12 years ago

To prevent SQL injections?

#4 @r-a-y
11 years ago

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

#5 @boonebgorges
11 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
11 years ago

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

#7 @boonebgorges
11 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
11 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
11 years ago

Good catch, Paul.

#10 @boonebgorges
11 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
11 years ago

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

#12 @nacin
11 years ago

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

#13 @DJPaul
11 years ago

nacin, yes; see #2776

Note: See TracTickets for help on using tickets.