Fixed html issues with the wp_editor.
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 21 May 2015 14:31:50 +0000 (10:31 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 21 May 2015 14:31:50 +0000 (10:31 -0400)
lib/GlmDataAbstract/DataAbstract.php
views/admin/member/memberInfo.html

index 94c357f..a62b83e 100755 (executable)
@@ -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;
index cf18b80..89038c3 100644 (file)
             <tr>
                 <th {if $memberInfo.fieldRequired.descr}class="glm-required"{/if}>Description:</th>
                 <td {if $memberInfo.fieldFail.descr}class="glm-form-bad-input"{/if}>
-                    {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