Skip to content
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

[GHS] Handle <script> #10891

Closed
Reinmar opened this issue Nov 23, 2021 · 3 comments · Fixed by #11075
Closed

[GHS] Handle <script> #10891

Reinmar opened this issue Nov 23, 2021 · 3 comments · Fixed by #11075
Assignees
Labels
package:html-support squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@Reinmar
Copy link
Member

Reinmar commented Nov 23, 2021

<script> is now ignored by GHS and cannot be enabled with it in any way.

@Reinmar Reinmar added type:task This issue reports a chore (non-production change) and other types of "todos". package:html-support squad:core Issue to be handled by the Core team. labels Nov 23, 2021
@Reinmar Reinmar changed the title [GHS] Handle <script> and <noscript> [GHS] Handle <script> Nov 24, 2021
@Reinmar
Copy link
Member Author

Reinmar commented Nov 24, 2021

Remarks:

  • So far, we skipped <script> element when defining the data schema for GHS ( ).
  • Editing view:
    • The renderer will turn this element into a hidden span.
  • Model:
    • <script> element can exist in block and inline contexts. This is - e.g directly in the root or inside <p>.
    • Model definition:
      • Allowed everywhere.
      • isInline: true, isBlock: false, isObject: false
    • Let's set the content of the script as an attribute of that model element.
  • We need to support <script> element attributes too.
  • We need to consider a training about GHS.

@Reinmar
Copy link
Member Author

Reinmar commented Nov 24, 2021

The behavior of this feature will be somehow similar to the behavior of the soft break.

@wimleers
Copy link

This will unblock https://www.drupal.org/project/drupal/issues/3245950 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:html-support squad:core Issue to be handled by the Core team. type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants