mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-02 20:27:40 +02: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:
@@ -4,18 +4,47 @@ if(!defined("PHORUM")) exit;
|
|||||||
|
|
||||||
// default HTML Purifier configuration settings
|
// default HTML Purifier configuration settings
|
||||||
$config->set('HTML', 'Allowed',
|
$config->set('HTML', 'Allowed',
|
||||||
// definitely needed
|
// alphabetically sorted
|
||||||
'a[href|title],blockquote[cite],b,pre,i,p,'.
|
'a[href|title]
|
||||||
// common semantic markup
|
abbr[title]
|
||||||
'del,ins,strong,em,'.
|
acronym[title]
|
||||||
// commmon presentational markup
|
b
|
||||||
's,strike,sub,sup,u,br,tt,div[class],img[src|alt|title|class],'. // div because bbcode [quote] uses it, img for smileys
|
blockquote[cite]
|
||||||
// uncommon semantic markup
|
br
|
||||||
'abbr[title],acronym[title],caption,code,dfn,cite,kbd,var,'.
|
caption
|
||||||
// lists
|
cite
|
||||||
'dd,dl,dt,ul,li,ol,'.
|
code
|
||||||
// tables
|
dd
|
||||||
'table,tr,tbody,thead,tfoot,td,th');
|
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', 'AutoParagraph', true);
|
||||||
$config->set('AutoFormat', 'Linkify', true);
|
$config->set('AutoFormat', 'Linkify', true);
|
||||||
$config->set('HTML', 'Doctype', 'XHTML 1.0 Transitional');
|
$config->set('HTML', 'Doctype', 'XHTML 1.0 Transitional');
|
||||||
|
@@ -115,6 +115,8 @@ if ($config_exists) {
|
|||||||
|
|
||||||
require_once 'HTMLPurifier/Printer/ConfigForm.php';
|
require_once 'HTMLPurifier/Printer/ConfigForm.php';
|
||||||
$htmlpurifier_form = new HTMLPurifier_Printer_ConfigForm('config', 'http://htmlpurifier.org/live/configdoc/plain.html#%s');
|
$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($htmlpurifier_form->render($config, $directives, false));
|
||||||
|
|
||||||
$frm->addMessage($warning);
|
$frm->addMessage($warning);
|
||||||
|
Reference in New Issue
Block a user