This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$url = 'http://en.wikipedia.org/wiki/1,1,1-Trichloroethane'; // example | |
$config = HTMLPurifier_Config::createDefault(); | |
$config->set('URI.Base', $url); // set the base URL (overrides a <base element in the HTML head?) | |
$config->set('URI.MakeAbsolute', true); // make all URLs absolute using the base URL set above | |
$config->set('AutoFormat.RemoveEmpty', true); // remove empty elements | |
$config->set('HTML.Doctype', 'XHTML 1.0 Strict'); // valid XML output (?) | |
$config->set('HTML.AllowedElements', array('p', 'div', 'a', 'br', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'ul', 'ol', 'li', 'b', 'i')); |
NewerOlder