Validate code field to not contain <script> or <style> tags to prevent human mistakes

Created on 27 June 2023, about 1 year ago
Updated 25 June 2024, 4 days ago

Problem/Motivation

Once again had the issue that someone had overseen the
Do NOT include the wrapping <script> element.
-message above the input.

It should be relatively easy to validate the form and ensure these tags are not present when saving the form (form_validate).

I guess we should check for:

  • <script> (JS)
  • <style> (CSS)

or both in both cases?

Do you agree?

Steps to reproduce

Enter or paste a code with <script> inside the JS asset textarea and wonder why it doesn't work.

Proposed resolution

See above

Remaining tasks

  1. Discuss
  2. Implement & write tests
  3. Release

User interface changes

Show an error message on save in the form, if such an element is present

API changes

None

Data model changes

None

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024