- Issue created by @Anybody
- 🇩🇪Germany lrwebks Porta Westfalica
That's definitely a good feature, but if we're simply searching for the tag via string search, we might run into an issue:
Let's say that I want to add a string within my JS that contains either<script>
or<style>
, then the Form would block that, even though this might be necessary in some cases. So would we just be searching viatrim()
followed bystr_starts_with()
/str_ends_with()
, or do you have a better idea? - Assigned to lrwebks
- 🇩🇪Germany lrwebks Porta Westfalica
I guess it would also be easier for us to check for both tags in both cases, as we could then only add this code to the FormBase instead of both forms, and it would not make any notable difference (JavaScript usually doesn't allow
<style>
at the beginning anyway and vice versa). - 🇩🇪Germany Anybody Porta Westfalica
Yeah good point, I agree #2 is a good solution and #4 also totally makes sense to me, as this is just a friendly convenience check to safeguard users from a typical stupid mistake :)
Please do it that way (use an array for tags to check) and implement it in the base.
Please also add a simple test to show it works as expected.
- Status changed to Needs work
8 months ago 1:00pm 3 June 2024 - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8last update
8 months ago Not currently mergeable. - last update
8 months ago 8 pass - last update
8 months ago 8 pass - last update
8 months ago 9 pass - Status changed to Needs review
8 months ago 9:07am 10 June 2024 - 🇩🇪Germany lrwebks Porta Westfalica
The general functionality is implemented, along with a basic test! Anything to add?
- Status changed to Needs work
8 months ago 10:06am 10 June 2024 - 🇩🇪Germany Anybody Porta Westfalica
Nice! Just one little correction to clarify this.
Also please add a code comment to explain why we're not simply checking for "contains" here. That's what you'd typically expect, I think.
- last update
8 months ago 9 pass - Status changed to Needs review
8 months ago 10:47am 17 June 2024 - Issue was unassigned.
- Status changed to RTBC
8 months ago 10:50am 17 June 2024 - 🇩🇪Germany Anybody Porta Westfalica
Thank you @LRWebks - to me this looks good!
-
pookmish →
committed bb71e238 on 8.x-2.x
Issue #3370634 by LRWebks, Anybody: Validate code field to not contain...
-
pookmish →
committed bb71e238 on 8.x-2.x
- Status changed to Fixed
7 months ago 6:35pm 25 June 2024 - 🇺🇸United States pookmish
Thanks for this.
I seem to be getting "An error occurred while merging. Try again." on all MR. I've commit the old fashion way.
Automatically closed - issue fixed for 2 weeks with no activity.