Revert change from 42577bc that introduced side effect in ConfigurableWYSIWYGValidator, function validateConfigured() #39444
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (*)
Commit 42577bc introduced a side effect in
validateConfigured()
function ofConfigurableWYSIWYGValidator
class.validateConfigured()
function now permanently modifiesallowedTags
property with adding/merging['body', 'html']
to the list of allowed tags on each invocation. This results in an ever growing list of allowed tags for the lifetime of the object of classConfigurableWYSIWYGValidator
.This hit us really hard since we have some long running PHP processes, that go trough HTML validation, calling
validateConfigured()
hundred of thousand of times. In the process,allowedTags
list grew huge, with an ever increasing size. We saw out PHP process worked increasingly more slow with CPU being at 100% all the time.Related Pull Requests
Unknown.
Fixed Issues (if relevant)
No reported issue found.
Manual testing scenarios (*)
validateConfigured()
multiple times. It will run increasingly more slowly.Questions or comments
No Questions
Contribution checklist (*)
Resolved issues: