-
Notifications
You must be signed in to change notification settings - Fork 470
Description
HTMLPurifier is not maintained anymore. Find another replacement toolset for "safe" HTML filtering.
It does not support HTML5: https://forum.pkp.sfu.ca/t/tinymce-stripping-anchor-tags-within-or-around-divs/72749/12
We currently use HTMLPurifier in the PKPString::stripUnsafeHtml function (lib/pkp/classes/core/PKPString.inc.php). This takes a configuration of allowed elements/attributes from config.inc.php.
PRs
pkp-lib --> #9257
ojs --> pkp/ojs#4025 [TEST ONLY]
omp --> pkp/omp#1581 [TEST ONLY]
ops --> pkp/ops#696 [TEST ONLY]
jatsTemplate --> pkp/jatsTemplate#30
oaiJats --> pkp/oaiJats#36
Update
Based on following reasons we have decided to revert back the Symfony HTML Sanitizer and keep using the HTMLPurifier
- Bug in the Symfony html sanitizer
- [Html Sanitizer] Sanitization remove single < (less than) char which is not part of any tag([Html Sanitizer] Sanitization remove single < (less than) char which is not part of any tag symfony/symfony#57597)
- Bug actually in the https://github.com/Masterminds/html5-php parser
- Parser remove the single < (less than) character from given html string
- Also the use of strip_tags will cause problem
- use of strip_tags omits anything after <=
- we can overcome it by not using strip_tags and that better
- Not using the strip_tags will removed any non standard tags and it's inner content, list of w3c standard tags/elements/attributes list based on w3c sanitization standard .
Reverting Back HTMLPurifier
pkp-lib --> #10197
ojs --> pkp/ojs#4365 [TEST ONLY]
omp --> pkp/omp#1634 [TEST ONLY]
ops --> pkp/ops#729 [TEST ONLY]
jatsTemplate --> pkp/jatsTemplate#46
oaiJats --> pkp/oaiJats#46
Metadata
Metadata
Assignees
Labels
Type
Projects
Status