Skip to content

Script Tag is sanitized in the output #35

Open

Description

@thequickcode

Hello,

When using the following custom code

<script> alert('hi') </script>

The result would sanitize the script tag as following

 &lt;script&gt;alert('hi')&lt;/script&gt;

Am I missing anything?

Activity

  1. quentin-bettoum commented on May 20, 2024

    @quentin-bettoum

    Hello,

    You could try with this config and see if it works for you:

    grapesjs.init({
      ...
      parser: {
        optionsHtml: {
          allowScripts: true,
        },
      },
    });
  2. thequickcode commented on May 23, 2024

    @thequickcode
    Author

    I used the following configs:

    grapesjs.init({
            allowScripts: true,
  3. quentin-bettoum commented on May 27, 2024

    @quentin-bettoum

    I used the following configs:

    grapesjs.init({
            allowScripts: true,

    This one is deprecated, it might not work anymore in the future.

    @deprecated in favor of `config.parser.optionsHtml.allowScripts`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions