• Resolved dsar

    (@dsar)


    Hi,

    Social articles doesn’t strip slashes from titles of posts. This results in backslashes being added for ‘, ” and \.
    Example: inputting title O’Hara results in it becoming O\’Hara

    Fix:

    Adding line

    
    $form_values[$this->slug]= stripslashes($form_values[$this->slug]);
    

    after line 45 in file social-articles/includes/sa-form/fields/classes/sa-title-class.php, so the whole function looks like below:

    
        public function save_data($article_id, $form_values)
        {
            $article = get_post($article_id);
            $form_values[$this->slug]= stripslashes($form_values[$this->slug]);
    
            $article->post_title = $form_values[$this->slug];
            $article->post_name = $form_values[$this->slug];
            wp_update_post( $article );
        }
    
    
    • This topic was modified 6 years, 10 months ago by dsar.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BUGREPORT + FIX for apostrophe in post title’ is closed to new replies.