Skip Navigation

Text Only/ Printer-Friendly

Updated REASON_DEFAULT_ALLOWED_TAGS

April 4, 2008 at 6:01 pm
By Matt Ryan

The Reason setting REASON_DEFAULT_ALLOWED_TAGS has been updated to closely align with the w3c's spec for XHTML strict.

Previously, the setting had a somewhat archaic soup of non-standard tags, and was missing a number of perfectly valid XHTML tags, like <fieldset> and <optgroup>.

If you are not updating your settings file via subversion, you may wish to update the block of code in reason_settings.php that defines REASON_DEFAULT_ALLOWED_TAGS with the following:

/**
* REASON_DEFAULT_ALLOWED_TAGS
* A whitelist of the XHTML tags Reason will allow to be saved to the database.
*
* Note: The default vaue of this setting is the set of xhtml strict elements that can be placed in the body of a page
*
* The two exceptions are the <script> tag, which is disabled
* (but which can be enabled by adding it to this setting),
* and the <u> tag, which is enabled for legacy reasons.
*
* Note that if your templates all use transitional doctypes, the following tags deprecated may be added:
* <applet><center><dir><font><iframe><isindex><menu><s><strike><xmp>
*
* If you plan on serving your content as XHTML 1.1, you may wish to add these tags for
* ruby (pronunciation annotations for East Asian languages):
* <ruby><rb><rbc><rp><rt><rtc>
*
* This string should be in the same format as the second argument to php's built-in strip_tags() function, e.g.: '<a><abbr><acronym><address>'
*/
define('REASON_DEFAULT_ALLOWED_TAGS','<a><abbr><acronym><address><area><b><bdo><big><blockquote><br><button><caption><cite><code><col><colgroup><dd><del><dfn><div><dl><dt><em><fieldset><form><h1><h2><h3><h4><h5><h6><hr><i><img><input><ins><kbd><label><legend><li><map><noscript><object><ol><optgroup><option><p><param><pre><q><samp><select><span><small><strike><strong><sub><sup><table><tbody><td><textarea><tfoot><th><thead><tr><tt><u><ul><var>');

Add a comment

Name:*
Comment:*
The following fields are not to be filled out. Skip to Submit Button.
Not Comment:
(This is here to trap robots. Don't put any text here.)
Not URL:
(This is here to trap robots. Don't put any text here.)
Avoid:
(This is here to trap robots. Don't put any text here.)