public static function PurifyXHTML($html = null, $encoding = 'UTF-8') {

		$config = self::GetHTMLPurifierConfig();
		$config->set('Core.Encoding', $encoding);
		$config->set('HTML.Doctype', 'XHTML 1.0 Strict');
		$config->set('HTML.TidyLevel', 'heavy'); // all changes, minus...
		$config->set('CSS.AllowedProperties', array());
		$config->set('Attr.AllowedClasses', array());
		$config->set('HTML.Allowed', null);
		$config->set('AutoFormat.RemoveEmpty', true); // Remove empty tags
		$config->set('AutoFormat.Linkify', true);	// add <A> to links
		$config->set('AutoFormat.AutoParagraph', true);
		$config->set('HTML.ForbiddenElements', array('span', 'center'));
		$config->set('Core.EscapeNonASCIICharacters', true);
		$config->set('Output.TidyFormat', true);

		$purifier = new \HTMLPurifier($config);
		$html = $purifier->purify($html);

		// Rimpiazzo le parentesi quadre
		$html = str_ireplace("%5B", "[", $html);
		$html = str_ireplace("%5D", "]", $html);

		return $html;
	}