<commit_before><?php declare(strict_types=1);
/**
 * Uthando CMS (http://www.shaunfreeman.co.uk/)
 *
 * @author      <NAME> <<EMAIL>>
 * @link        https://github.com/uthando-cms for the canonical source repository
 * @copyright   Copyright (c) 28/09/17 <NAME>. (http://www.shaunfreeman.co.uk)
 * @license     see LICENSE
 */

namespace UthandoCommon\Options;

class HtmlPurifierOptions
{
    protected $config = [
        'Cache.SerializerPath' => APPLICATION_PATH . '/data/cache',
        //'Cache.SerializerPath'  => null,
        'Attr.ID.HTML5'         => true,
        'HTML.DefinitionID'     => 'html5-definitions',
        'HTML.DefinitionRev'     => 1,
    ];

    protected $HtmlDefinition = [
        // allow html5 elements
        'elements'      => [
            // allow <a> to be block level
            ['a', 'Block', 'Flow', 'Common', []],
            // new elements
            ['section', 'Block', 'Flow', 'Common', []],
            ['nav',     'Block', 'Flow', 'Common', []],<commit_msg>added safe iframe to HTMLPurifier<commit_after><?php declare(strict_types=1);
/**
 * Uthando CMS (http://www.shaunfreeman.co.uk/)
 *
 * @author      <NAME> <<EMAIL>>
 * @link        https://github.com/uthando-cms for the canonical source repository
 * @copyright   Copyright (c) 28/09/17 Shaun Freeman. (http://www.shaunfreeman.co.uk)
 * @license     see LICENSE
 */

namespace UthandoCommon\Options;

class HtmlPurifierOptions
{
    protected $config = [
        'Cache.SerializerPath' => APPLICATION_PATH . '/data/cache',
        //'Cache.SerializerPath'  => null,
        'Attr.ID.HTML5'         => true,
        'HTML.DefinitionID'     => 'html5-definitions',
        'HTML.DefinitionRev'    => 1,
        'HTML.SafeIframe'       => true,
        'URI.SafeIframeRegexp'  =>  '%^(http:|https:)?//(www.youtube(?:-nocookie)?.com/embed/|player.vimeo.com/video/)%',
    ];

    protected $HtmlDefinition = [
        // allow html5 elements
        'elements'      => [
            // allow <a> to be block level
            ['a', 'Block', 'Flow', 'Common', []],
            // new elements
            ['section', 'Block', 'Flow', 'Common', []],
            ['nav',     'Block', 'Flow', 'Common', []],
{'fraction_non_alphanumeric': 0.17729534147444595, 'fraction_numerical': 0.009950248756218905, 'mean_word_length': 2.2529411764705882, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 26, 'https://': 2, 'lorem ipsum': 0, 'www.': 5, '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': '3742692', 'n_tokens_mistral': 708, 'n_tokens_neox': 687, 'n_words': 143}