<commit_before><?php
 /**
 * ownCloud
 *
 * @author <NAME>
 * @copyright 2014 <NAME> <EMAIL>
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

namespace OCA\Mail\Service;

class Html {

	public function __construct() {
		$config = \HTMLPurifier_Config::createDefault();
		$config->set('HTML.ForbiddenAttributes', 'class');
//		$config->set('Cache.SerializerPath', $directory);
//		$config->set('HTML.SafeIframe', true);
		$config->set('URI.SafeIframeRegexp',
			'%^(?:https?:)?//(' .
			'www.youtube(?:-nocookie)?.com/embed/|' .
			'player.vimeo.com/video/)%'); //allow YouTube and Vimeo
		$this->purifier = new \HTMLPurifier($config);
	}

	/**<commit_msg>adjust html purifier settings<commit_after><?php
 /**
 * ownCloud
 *
 * @author <NAME>
 * @copyright 2014 <NAME> <EMAIL>
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

namespace OCA\Mail\Service;

class Html {

	public function __construct() {
		$config = \HTMLPurifier_Config::createDefault();
		$config->set('HTML.SafeIframe', true);
		$config->set('URI.SafeIframeRegexp',
			'%^(?:https?:)?//(' .
			'www.youtube(?:-nocookie)?.com/embed/|' .
			'player.vimeo.com/video/)%'); //allow YouTube and Vimeo
		$this->purifier = new \HTMLPurifier($config);
	}

	/**
{'fraction_non_alphanumeric': 0.19249478804725503, 'fraction_numerical': 0.005559416261292564, 'mean_word_length': 3.864864864864865, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1960482', 'n_tokens_mistral': 528, 'n_tokens_neox': 494, 'n_words': 109}