Skip to content

wpautop is applied to server-side rendered block output #2736

@lamosty

Description

@lamosty

While working on creating a block for the Jetpack subscription functionality, I stumbled upon an issue: if the output from the render_callback function contains inline JS (like this), wpautop will add paragraphs to the JS code so it won't work:

screen shot 2017-09-15 at 14 56 24

If I return early from wpautop, no <p>s are added.

#gutenbug

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrameworkIssues related to broader framework topics, especially as it relates to javascript[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions