AnsPress_Validation::encode_pre_code( string $field )

Description #

Encode contents inside pre and code tag

Parameters #

  • $field
    string (Required)

Changelog #

VersionDescription
2.0.1Introduced.

Source #

File: includes/class/validation.php

	private function encode_pre_code($field) {

		$this->fields[$field] = preg_replace_callback( '/<pre.*?>(.*?)<\/pre>/imsu', array( $this, 'pre_content' ), $this->fields[$field] );
		$this->fields[$field] = preg_replace_callback( '/<code.*?>(.*?)<\/code>/imsu', array( $this, 'code_content' ), $this->fields[$field] );
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment