src/properties/class-papi-property-text.php
public function format_value( $value, $slug, $post_id ) {
		if ( ! $this->get_setting( 'allow_html' ) ) {
			$value = maybe_unserialize( $value );

			if ( ! is_string( $value ) ) {
				$value = '';
			}

			$value = wp_strip_all_tags( $value );

			if ( ! papi_is_admin() ) {
				$value = $this->get_setting( 'nl2br' ) ? nl2br( $value ) : $value;
			}
		}

		return $value;
	}
public function format_value( $value, $slug, $post_id ) {
		if ( ! $this->get_setting( 'allow_html' ) ) {
			$value = maybe_unserialize( $value );

			if ( ! is_string( $value ) ) {
				$value = '';
			}

			$value = wp_strip_all_tags( $value );

			if ( ! papi_is_admin() ) {
				$value = $this->get_setting( 'nl2br' ) ? nl2br( $value ) : $value;
			}
		}

		return $value;
	}
Format the value of the property before it's returned
to WordPress admin or the site.

@param  mixed  $value
@param  string $slug
@param  int    $post_id

@return array