Skip to content

quote in html attribute creates broken html #1091

Closed

Description

@pfgithub

Describe the bug

solid js generates broken html

<span style=""">

Your Example Website or App

https://playground.solidjs.com/?version=1.4.1#NobwRAdghgtgpmAXGGUCWEwBowBcCeADgsrgM4Ae2YZA9gK4BOAxiWADxmFQQAEZBADZwAvCAA6YcdKlgAvgD52Aei48F8gLpA

Steps to Reproduce the Bug or Issue

<span style={"\""}></span>

Expected behavior

Expected:

import { template } from 'solid-js/web';

const _tmpl$ = /*#__PURE__*/template(`<span style="&quot;"></span>`, 2);

/* source: main.tsx */
_tmpl$.cloneNode(true);

Actual:

import { template } from 'solid-js/web';

const _tmpl$ = /*#__PURE__*/template(`<span style="""></span>`, 2);

/* source: main.tsx */
_tmpl$.cloneNode(true);

Notice the <span style=""">, this messes up the html.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Firefox

Additional context

No response

Activity

  1. added a commit that references this issue on Oct 26, 2024
    7c2957c
  2. added a commit that references this issue on Nov 12, 2025
    6f38953
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions