From 87c7f124ada498dd48d0e228831b481146010527 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 21 May 2015 10:31:50 -0400 Subject: [PATCH] Fixed html issues with the wp_editor. --- lib/GlmDataAbstract/DataAbstract.php | 5 ++--- views/admin/member/memberInfo.html | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/GlmDataAbstract/DataAbstract.php b/lib/GlmDataAbstract/DataAbstract.php index 94c357f7..a62b83ee 100755 --- a/lib/GlmDataAbstract/DataAbstract.php +++ b/lib/GlmDataAbstract/DataAbstract.php @@ -1205,11 +1205,10 @@ abstract class GlmDataAbstract // Otherwise, if no filter is specified. } else { - // 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]))); + // Kill slashes and use the standard WordPress wp_kses_post() function to do the filtering + $in = wp_kses_post(stripslashes($_POST[$as])); } - // Check for required field if (isset($f['required']) && $f['required'] && trim($in) == '') { $this->inputFieldStatus = false; diff --git a/views/admin/member/memberInfo.html b/views/admin/member/memberInfo.html index cf18b807..89038c3f 100644 --- a/views/admin/member/memberInfo.html +++ b/views/admin/member/memberInfo.html @@ -90,10 +90,11 @@ Description: - {php} - wp_editor('{$memberInfo.fieldData.descr|escape:quotes|nl2br}', 'glm_descr', array( + {php} + wp_editor('{$memberInfo.fieldData.descr|escape:quotes}', 'glm_descr', array( // 'media_buttons' => true, // 'quicktags' => false, + 'wpautop' => false, 'textarea_name' => 'descr', 'editor_height' => 200, // Height in px, overrides editor_rows // 'textarea_rows' => 8 -- 2.17.1