Add ADD_FORBID_CONTENTS setting by MariusRumpf · Pull Request #1168 · cure53/DOMPurify (original) (raw)
Summary
This PR implements the option ADD_FORBID_CONTENTS discussed in #1165 and adds two tests to check that.
Background & Context
DOMPurify has an internal default list for the FORBID_CONTENTS setting, which is used when it is not set. To allow extending the default DEFAULT_FORBID_CONTENTS this adds a new configuration option ADD_FORBID_CONTENTS. This configuration option extends the default or user given list in FORBID_CONTENTS.
Given this option, it is no longer required to keep a copy of the DEFAULT_FORBID_CONTENTS in code as a user of this library.
Resolves #1165.