Skip to content

'sandbox' attribute is not removed when bound to a nullish value #13946

@tomasz-pucka

Description

@tomasz-pucka

Version

3.5.22

Reproduction link

play.vuejs.org/

Steps to reproduce

Run the reproduction and confirm the presence of sandbox attribute in the iframe element.

What is expected?

According to the Vue docs, the sandbox attribute shouldn't be present - the sandbox restrictions shouldn't be applied.
This behavior is observable in Vue 2 in this example:
https://codepen.io/tomasz-pucka/pen/gbPrzoV

What is actually happening?

sandbox attribute is set to 'null' string resulting in console errors. Setting it to an empty string applies the most restrictive sandbox mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions