From: Steve Sutton Date: Tue, 4 Sep 2018 16:51:04 +0000 (-0400) Subject: Update for the notes field X-Git-Tag: v1.0.0^2~3 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=0ae2316672e656ad9e241048e9bfab139db79286;p=WP-Plugins%2Fglm-member-db-travel.git Update for the notes field Get rid of extra slashes. --- diff --git a/models/admin/ajax/travelNotes.php b/models/admin/ajax/travelNotes.php index e00e733..0a43769 100644 --- a/models/admin/ajax/travelNotes.php +++ b/models/admin/ajax/travelNotes.php @@ -85,7 +85,14 @@ class GlmMembersAdmin_ajax_travelNotes extends GlmDataTravelNotes case 'update': $lead_id = (isset($_REQUEST['id'])) ? filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT ) : false; $note_id = (isset($_REQUEST['note_id'])) ? filter_var( $_REQUEST['note_id'], FILTER_VALIDATE_INT ) : false; - $note_entry = (isset($_REQUEST['note_entry'])) ? filter_var( $_REQUEST['note_entry'], FILTER_SANITIZE_STRING ) : false; + $note_entry + = (isset($_REQUEST['note_entry'])) + ? filter_var( + stripslashes( $_REQUEST['note_entry'] ), + FILTER_SANITIZE_STRING, + array( 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES ) + ) + : false; if ( $lead_id && $note_id && $note_entry ) { $this->wpdb->update( GLM_MEMBERS_TRAVEL_PLUGIN_DB_PREFIX . 'lead_notes', @@ -104,8 +111,7 @@ class GlmMembersAdmin_ajax_travelNotes extends GlmDataTravelNotes case 'add': $lead_id = filter_var( $_REQUEST['id'], FILTER_VALIDATE_INT ); if ( isset( $_REQUEST['new_log'] ) && $lead_id - && $new_note = filter_var( $_REQUEST['new_log'], FILTER_SANITIZE_STRING ) - ) { + && $new_note = filter_var( stripslashes( $_REQUEST['new_log'] ), FILTER_SANITIZE_STRING, array( 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES ) ) ) { $this->wpdb->insert( GLM_MEMBERS_TRAVEL_PLUGIN_DB_PREFIX . 'lead_notes',