Added code tag to the list of allowed tags.

This commit is contained in:
Loic d'Anterroches 2009-02-01 14:24:04 +01:00
parent a116c27c03
commit 088f426986

View File

@ -90,32 +90,33 @@ class IDF_Template_MarkdownPrefilter extends Pluf_Text_HTML_Filter
); );
public $allowed = array( public $allowed = array(
'img' => array('src', 'class', 'alt', 'height', 'width', 'style'), 'a' => array('href', 'title', 'rel'),
'strong' => array(), 'address' => array(),
'em' => array(),
'b' => array(), 'b' => array(),
'i' => array(), 'blockquote' => array(),
'ul' => array(), 'br' => array(),
'ol' => array(), 'caption' => array(),
'li' => array(), 'code' => array(),
'dd' => array(),
'div' => array('align', 'class'),
'dl' => array(), 'dl' => array(),
'dt' => array(), 'dt' => array(),
'dd' => array(), 'em' => array(),
'p' => array('align', 'class'),
'div' => array('align', 'class'),
'br' => array(),
'pre' => array(),
'table' => array('summary'),
'caption' => array(),
'tr' => array(),
'td' => array('style'),
'h1' => array(), 'h1' => array(),
'h2' => array(), 'h2' => array(),
'h3' => array(), 'h3' => array(),
'hr' => array(), 'hr' => array(),
'address' => array(), 'i' => array(),
'a' => array('href', 'title', 'rel'), 'img' => array('src', 'class', 'alt', 'height', 'width', 'style'),
'blockquote' => array(), 'li' => array(),
'ol' => array(),
'p' => array('align', 'class'),
'pre' => array(),
'strong' => array(),
'table' => array('summary'),
'td' => array('style'),
'tr' => array(),
'ul' => array(),
); );
// tags which should always be self-closing (e.g. "<img />") // tags which should always be self-closing (e.g. "<img />")
public $no_close = array( public $no_close = array(
@ -130,6 +131,7 @@ class IDF_Template_MarkdownPrefilter extends Pluf_Text_HTML_Filter
'strong', 'strong',
'em', 'em',
'b', 'b',
'code',
'i', 'i',
'ul', 'ul',
'ol', 'ol',