From: Chuck Scott Date: Mon, 23 Mar 2015 18:56:45 +0000 (-0400) Subject: Fixed new line issue with tinyMCE editor data X-Git-Tag: v1.0.0~44 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=51f72d4fc104b018931c96a2bbe35fca24f26045;p=WP-Plugins%2Fglm-member-db.git Fixed new line issue with tinyMCE editor data --- diff --git a/lib/GlmDataAbstract/DataAbstract.php b/lib/GlmDataAbstract/DataAbstract.php index 5fd3d3b7..e7eaf11b 100755 --- a/lib/GlmDataAbstract/DataAbstract.php +++ b/lib/GlmDataAbstract/DataAbstract.php @@ -1203,9 +1203,10 @@ abstract class GlmDataAbstract $in = filter_input(INPUT_POST, $as, $filter, $filter_options); - // Otherwise, if no filter is specified, use the standard WordPress wp_kses_post() function to to the filtering - Requires slashes removed first. + // Otherwise, if no filter is specified. } else { - $in = wp_kses_post(stripslashes($_POST[$as])); + // Kill slashes and use the standard WordPress wp_kses_post() function to to the filtering then apply nl2br() + $in = nl2br(wp_kses_post(stripslashes($_POST[$as]))); } diff --git a/views/admin/member/memberInfo.html b/views/admin/member/memberInfo.html index ec971fcb..cf18b807 100644 --- a/views/admin/member/memberInfo.html +++ b/views/admin/member/memberInfo.html @@ -91,7 +91,7 @@ Description: {php} - wp_editor('{$memberInfo.fieldData.descr|escape:quotes}', 'glm_descr', array( + wp_editor('{$memberInfo.fieldData.descr|escape:quotes|nl2br}', 'glm_descr', array( // 'media_buttons' => true, // 'quicktags' => false, 'textarea_name' => 'descr',