This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
forked from ezyang/htmlpurifier
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement %HTML.AllowedComments and %HTML.AllowedCommentsRegexp
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
- Loading branch information
Showing
8 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedComments.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
HTML.AllowedComments | ||
TYPE: lookup | ||
VERSION: 4.3.1 | ||
DEFAULT: array() | ||
--DESCRIPTION-- | ||
A whitelist which indicates what explicit comment bodies should be | ||
allowed, modulo leading and trailing whitespace. See also %HTML.AllowedCommentsRegexp | ||
(these directives are union'ed together, so a comment is considered | ||
valid if any directive deems it valid.) | ||
--# vim: et sw=4 sts=4 |
15 changes: 15 additions & 0 deletions
15
library/HTMLPurifier/ConfigSchema/schema/HTML.AllowedCommentsRegexp.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
HTML.AllowedCommentsRegexp | ||
TYPE: string/null | ||
VERSION: 4.3.1 | ||
DEFAULT: NULL | ||
--DESCRIPTION-- | ||
A regexp, which if it matches the body of a comment, indicates that | ||
it should be allowed. Trailing and leading spaces are removed prior | ||
to running this regular expression. | ||
<strong>Warning:</strong> Make sure you specify | ||
correct anchor metacharacters <code>^regex$</code>, otherwise you may accept | ||
comments that you did not mean to! In particular, the regex <code>/foo|bar/</code> | ||
is probably not sufficiently strict, since it also allows <code>foobar</code>. | ||
See also %HTML.AllowedComments (these directives are union'ed together, | ||
so a comment is considered valid if any directive deems it valid.) | ||
--# vim: et sw=4 sts=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters