Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed check for textarea fields (allow raw)

  • Loading branch information...
commit ab3dfa641e67dd6c6a491ac484779e4cdbf3b9cc 1 parent 68a8ea1
@webbird authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 class.wbFormBuilder.php
View
5 class.wbFormBuilder.php
@@ -521,9 +521,11 @@ public function checkForm( $formname = '' ) {
if ( isset( $element['allow'] ) ) {
$allow = $element['allow'];
}
+ $this->log()->LogDebug( 'allow: '.$allow );
// check captcha
if ( $element['type'] == 'captcha' ) {
+ $this->log()->LogDebug( 'checking captcha' );
if ( ! class_exists('wbFormBuilderCaptcha',false) ) {
include dirname(__FILE__).'/wbFormBuilder/class.wbFormBuilderCaptcha.php';
@@ -548,7 +550,8 @@ public function checkForm( $formname = '' ) {
// makes the check for required field fail.
if ( $element['type'] == 'textarea' ) {
if ( isset($element['editor']) && $element['editor'] == true ) {
- $value = $this->val->param( $element['name'] );
+ $value = $this->val->param( $element['name'], 'PCRE_PLAIN' );
+ // br only means there's no content
if ( preg_match( '/^<br>$/i', $value ) ) {
$this->val->delete( $element['name'] );
}
Please sign in to comment.
Something went wrong with that request. Please try again.