New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow adding allowed values to existing attributes #65
Comments
In TYPO3 v11 this has been removed - In this particular case all values-definitions for attr Adding new |
Thinking a bit about that, it probably makes sense to deprecate |
Thanks for the fast response. Your proposed Change to TYPO3 should already solve the job anyway, so no need to extend the API :) |
Would love that. Would be easier to understand and probably reflect real world more :) |
Prior to this change, using the first match out of multiple `AttrValueInterface` items had to be declared explicitly using flag `Attr::MATCH_FIRST_VALUE` - thus, all values had to match. With this change, only the first match is considered (implicit flag `Attr::MATCH_FIRST_VALUE`). To declare that all value items have to match, new `Attr::MATCH_ALL_VALUES` has been introduced. Deprecations: * `\TYPO3\HtmlSanitizer\Behavior\Attr::MATCH_FIRST_VALUE` * `\TYPO3\HtmlSanitizer\Behavior\Attr::shallMatchFirstValue()` New additions: * `\TYPO3\HtmlSanitizer\Behavior\Attr::MATCH_ALL_VALUES` * `\TYPO3\HtmlSanitizer\Behavior\Attr::shallMatchAllValues()` Fixes: TYPO3#65
@DanielSiepmann Looking forward to receiving your feedback on PR #66 (which makes mentioned core change above obsolete) |
Prior to this change, using the first match out of multiple `AttrValueInterface` items had to be declared explicitly using flag `Attr::MATCH_FIRST_VALUE` - thus, all values had to match. With this change, only the first match is considered (implicit flag `Attr::MATCH_FIRST_VALUE`). To declare that all value items have to match, new `Attr::MATCH_ALL_VALUES` has been introduced. Deprecations: * `\TYPO3\HtmlSanitizer\Behavior\Attr::MATCH_FIRST_VALUE` * `\TYPO3\HtmlSanitizer\Behavior\Attr::shallMatchFirstValue()` New additions: * `\TYPO3\HtmlSanitizer\Behavior\Attr::MATCH_ALL_VALUES` * `\TYPO3\HtmlSanitizer\Behavior\Attr::shallMatchAllValues()` Fixes: TYPO3#65
Prior to this change, using the first match out of multiple `AttrValueInterface` items had to be declared explicitly using flag `Attr::MATCH_FIRST_VALUE` - thus, all values had to match. With this change, only the first match is considered (implicit flag `Attr::MATCH_FIRST_VALUE`). To declare that all value items have to match, new `Attr::MATCH_ALL_VALUES` has been introduced. Deprecations: * `\TYPO3\HtmlSanitizer\Behavior\Attr::MATCH_FIRST_VALUE` * `\TYPO3\HtmlSanitizer\Behavior\Attr::shallMatchFirstValue()` New additions: * `\TYPO3\HtmlSanitizer\Behavior\Attr::MATCH_ALL_VALUES` * `\TYPO3\HtmlSanitizer\Behavior\Attr::shallMatchAllValues()` Fixes: #65
Do you have any idea if and when that will be added? |
I've come to code where custom
onclick
is added toa
-Tags.TYPO3 already ads an
onclick
to allow list fora
-Tags.I could not find any way to add another allowed value to the list.
Looks like the code is too robust to allow me to add or alter the already configured behaviour.
I only could remove the already build
a
-Tag and build it from scratch / from reading original values excluding theonclick
and rebuilding it again?Do I overlook something here? How should a developer use the library in such situation, where a framework already adds configuration?
That's our code which is just not called, because TYPO3
onclick
value already does not match. Further values are not checked anymore. I couldn't find a way to check whether at least one value matches.The text was updated successfully, but these errors were encountered: