WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#33497 closed defect (bug) (invalid)

Customizer textarea adds slashes

Reported by: Looimaster Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: General Keywords:
Focuses: Cc:
PR Number:

Description

$wp_customize->add_setting( 'something', array(
	'default' => '',
	'sanitize_callback' => 'wp_filter_nohtml_kses',
) );

$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'something', array(
	'label' => '',
	'section' => 'colors',
	'type' => 'textarea',
) ) );

When " is entered then it's loaded as \" next time.

Change History (2)

#1 @Looimaster
4 years ago

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

My mistake. wp_filter_nohtml_kses was causing this.

#2 @swissspidy
4 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.