Skip to content

renderToStaticMarkup incorrectly renders async attribute #11624

@clementallen

Description

@clementallen

Do you want to request a feature or report a bug?
Bug

What is the current behaviour?
The async tag is rendered with a value of empty quotes like so: <script async="" src={url}></script>

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem:
http://jsfiddle.net/twceacmz/
Note: The fiddle adds the async tag to a div because script tags aren't allowed. The behaviour is exactly the same.

What is the expected behavior?
The async tag should be rendered with no quotes like so: <script async src={url}></script>

Using react-dom's render method the async tag works as expected - its only with react-dom/server's renderToStaticMarkup method that the behaviour is different.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
Latest

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions