$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])));
}
<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}', 'glm_descr', array(
+ wp_editor('{$memberInfo.fieldData.descr|escape:quotes|nl2br}', 'glm_descr', array(
// 'media_buttons' => true,
// 'quicktags' => false,
'textarea_name' => 'descr',