Skip to content

Stripping <script> tags when saving post #12925

Description

@webmandesign

Description

When adding a <script> tag into post content in Code Editor mode, the tag is not stripped out during post saving/update/publish process. This is working fine in excerpt field though.

This is not a security issue, as the post content is saved without the actual <script> tags.

It's just that page refresh/reload is required to preview of what has really happened with the tags in post content.

To reproduce

Stripping script tag in post content is not working as expected

Expected behavior

<script> tags should be stripped out the same way as it is in excerpt field.

Additional context

  • Tested using WordPress 5.0.1 (without Gutenberg plugin enabled)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Feature] SavingRelated to saving functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions