mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-03-11 17:18:44 +00:00
Tweak to make more conducive to our new textareas.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1274 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
ed44b5c5ba
commit
d7157d0ccd
@ -4,18 +4,47 @@ if(!defined("PHORUM")) exit;
|
||||
|
||||
// default HTML Purifier configuration settings
|
||||
$config->set('HTML', 'Allowed',
|
||||
// definitely needed
|
||||
'a[href|title],blockquote[cite],b,pre,i,p,'.
|
||||
// common semantic markup
|
||||
'del,ins,strong,em,'.
|
||||
// commmon presentational markup
|
||||
's,strike,sub,sup,u,br,tt,div[class],img[src|alt|title|class],'. // div because bbcode [quote] uses it, img for smileys
|
||||
// uncommon semantic markup
|
||||
'abbr[title],acronym[title],caption,code,dfn,cite,kbd,var,'.
|
||||
// lists
|
||||
'dd,dl,dt,ul,li,ol,'.
|
||||
// tables
|
||||
'table,tr,tbody,thead,tfoot,td,th');
|
||||
// alphabetically sorted
|
||||
'a[href|title]
|
||||
abbr[title]
|
||||
acronym[title]
|
||||
b
|
||||
blockquote[cite]
|
||||
br
|
||||
caption
|
||||
cite
|
||||
code
|
||||
dd
|
||||
del
|
||||
dfn
|
||||
div
|
||||
dl
|
||||
dt
|
||||
em
|
||||
i
|
||||
img[src|alt|title|class]
|
||||
ins
|
||||
kbd
|
||||
li
|
||||
ol
|
||||
p
|
||||
pre
|
||||
s
|
||||
strike
|
||||
strong
|
||||
sub
|
||||
sup
|
||||
table
|
||||
tbody
|
||||
td
|
||||
tfoot
|
||||
th
|
||||
thead
|
||||
tr
|
||||
tt
|
||||
u
|
||||
ul
|
||||
var');
|
||||
$config->set('AutoFormat', 'AutoParagraph', true);
|
||||
$config->set('AutoFormat', 'Linkify', true);
|
||||
$config->set('HTML', 'Doctype', 'XHTML 1.0 Transitional');
|
||||
|
@ -115,6 +115,8 @@ if ($config_exists) {
|
||||
|
||||
require_once 'HTMLPurifier/Printer/ConfigForm.php';
|
||||
$htmlpurifier_form = new HTMLPurifier_Printer_ConfigForm('config', 'http://htmlpurifier.org/live/configdoc/plain.html#%s');
|
||||
$htmlpurifier_form->setTextareaDimensions(23, 7); // widen a little, since we have space
|
||||
|
||||
$frm->addMessage($htmlpurifier_form->render($config, $directives, false));
|
||||
|
||||
$frm->addMessage($warning);
|
||||
|
Loading…
x
Reference in New Issue
Block a user