[Rt-commit] rt branch, 4.0/html-language-attributes, created. rt-4.0.5-114-ga625c19
Thomas Sibley
trs at bestpractical.com
Tue Apr 3 10:31:02 EDT 2012
The branch, 4.0/html-language-attributes has been created
at a625c19ef0f65ed3a690d298e24dc5c999fb6487 (commit)
- Log -----------------------------------------------------------------
commit a625c19ef0f65ed3a690d298e24dc5c999fb6487
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Apr 3 10:26:10 2012 -0400
Permit <bdo> tags and the lang and dir attributes when displaying HTML
The <bdo> element and lang/dir attributes are used in mixed language
contexts and they are often essential for correct display. CKEditor
will also generate the attributes if properly configured, so RT
shouldn't scrub them out.
Refer to http://www.w3.org/TR/html4/struct/dirlang.html#h-8.1 for the
source of the acceptable values.
Resolves [rt3 #19691].
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 01789ea..8e89ce8 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -2864,11 +2864,13 @@ sub _NewScrubber {
)\s* ;? \s*)
+$ # one or more of these allowed properties from here 'till sunset
}ix,
+ dir => qr/^(rtl|ltr)$/i,
+ lang => qr/^\w+(-\w+)?$/,
}
);
$scrubber->deny(qw[*]);
$scrubber->allow(
- qw[A B U P BR I HR BR SMALL EM FONT SPAN STRONG SUB SUP STRIKE H1 H2 H3 H4 H5 H6 DIV UL OL LI DL DT DD PRE BLOCKQUOTE]
+ qw[A B U P BR I HR BR SMALL EM FONT SPAN STRONG SUB SUP STRIKE H1 H2 H3 H4 H5 H6 DIV UL OL LI DL DT DD PRE BLOCKQUOTE BDO]
);
$scrubber->comment(0);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list