<commit_before><?php

namespace Kordy\Ticketit\Traits;

use Kordy\Ticketit\Models\Setting;
use Mews\Purifier\Facades\Purifier;

trait Purifiable
{
    /**
     * Returns an array with both filtered and excluded html
     *
     * @param string $rawHtml
     *
     * @return array
     */
    public function purifyHtml($rawHtml)
    {
        $a_html['content']= Purifier::clean($rawHtml, ['HTML.Allowed' => '']);
        $a_html['html']= Purifier::clean($rawHtml, Setting::grab('purifier_config'));

        return $a_html;
    }
}<commit_msg>make new purifyHtml() trims all kind of empty content<commit_after><?php

namespace Kordy\Ticketit\Traits;

use Kordy\Ticketit\Models\Setting;
use Mews\Purifier\Facades\Purifier;

trait Purifiable
{
    /**
     * Returns an array with both filtered and excluded html
     *
     * @param string $rawHtml
     *
     * @return array
     */
    public function purifyHtml($rawHtml)
    {        
		$a_html['content']= trim(Purifier::clean($rawHtml, ['HTML.Allowed' => '']),chr(0xC2).chr(0xA0)." \t\n\r\0\x0B");
        $a_html['html']= trim(Purifier::clean($rawHtml, Setting::grab('purifier_config')),chr(0xC2).chr(0xA0)." \t\n\r\0\x0B");

        return $a_html;
    }
}
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.009868421052631578, 'mean_word_length': 3.2110726643598615, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6312462', 'n_tokens_mistral': 441, 'n_tokens_neox': 434, 'n_words': 79}