You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
cosmopet.ae/wp-content copy/plugins copy/wp-all-export/classes/CdataStrategyIllegalCharact...

24 lines
593 B

<?php
require_once('CdataStrategy.php');
class CdataStrategyIllegalCharacters implements CdataStrategy
{
private $illegalCharacters = array('<','>','&', '\'', '"','**LT**', '**GT**');
public function should_cdata_be_applied($field, $hasSnippets = false)
{
if($hasSnippets) {
$this->illegalCharacters = array('<','>','&', '**LT**', '**GT**');
}
foreach($this->illegalCharacters as $character) {
if(strpos($field, $character) !== false) {
return true;
}
}
return false;
}
}