Code Duplication    Length = 7-7 lines in 2 locations

classes/models/FrmEntryFormat.php 1 location

@@ 220-226 (lines=7) @@
217
	private static function maybe_strip_html( $plain_text, &$val ) {
218
		_deprecated_function( __FUNCTION__, '2.03.11', 'instance of FrmEntryValues or FrmProEntryValues' );
219
220
		if ( $plain_text && ! is_array( $val ) ) {
221
			if ( strpos( $val, '<img' ) !== false ) {
222
				$val = str_replace( array( '<img', 'src=', '/>', '"' ), '', $val );
223
				$val = trim( $val );
224
			}
225
			$val = strip_tags( $val );
226
		}
227
	}
228
229
	/**

classes/models/FrmEntryFormatter.php 1 location

@@ 610-616 (lines=7) @@
607
				foreach ( $value as $key => $single_value ) {
608
					$value[ $key ] = $this->strip_html( $single_value );
609
				}
610
			} else if ( $this->is_plain_text && ! is_array( $value ) ) {
611
				if ( strpos( $value, '<img' ) !== false ) {
612
					$value = str_replace( array( '<img', 'src=', '/>', '"' ), '', $value );
613
					$value = trim( $value );
614
				}
615
				$value = strip_tags( $value );
616
			}
617
		}
618
619
		return $value;