Support » Plugins » wp_editor issue with slashes and sanitizing output

  • I am using wp_editor and I want to allow to enter single or double quotes on text area. So, I am using strislashes.

    if( isset( $_POST['content_area'])) 
            $contingut = (  ($_POST['content_area'])); // needs sanitizing ???
    $args = array( 'title' => $title,
            'content_area' => $content_area, 
            ) ;
    if (isset($_POST['Modify']))  {
            	$result = $wpdb->update( $table, $args, array( 'title' => $title); }
    wp_editor( stripslashes($content), $editor_id, $settings );?>
    • This topic was modified 1 year, 2 months ago by capbussat.
Viewing 1 replies (of 1 total)
  • I can fill the form with single quotes or double quotes, which I have solved applying the function stripslashes befor wp_editor
    My question is if should I use some function to sanitize the text content edited by wp_editor? See code below.

    if( isset( $_POST['content_area'])) 
            $content = (  ($_POST['content_area']))

    I have tried with sanitize_text_area but changes HTML TAGS like for &lt:strong< which makes it useless for my purposes. I need to keep HTML tags.

    Thanks for any suggestions

Viewing 1 replies (of 1 total)
  • The topic ‘wp_editor issue with slashes and sanitizing output’ is closed to new replies.