Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seems to ignore html attibutes without assigment #28

Closed
toddself opened this issue Jun 5, 2016 · 3 comments
Closed

seems to ignore html attibutes without assigment #28

toddself opened this issue Jun 5, 2016 · 3 comments

Comments

@toddself
Copy link
Contributor

toddself commented Jun 5, 2016

<input disabled><br>

returns

<input><br></input>

but

<input disabled="true"><br>

returns

<input disabled=disabled><br>

Is this intentional? Un-assigned attributes like the first example are valid in HTML5 (I believe actually valid in everything except XHTML)

(ie the following is valid according to https://validator.w3.org

<!doctype html>
<title>test</title>
<form>
<input disabled>
</form>

)

@toddself toddself closed this as completed Jun 5, 2016
@toddself toddself reopened this Jun 5, 2016
@jamesplease
Copy link

Likely related: choojs/hyperx#14

@toddself
Copy link
Contributor Author

toddself commented Jun 5, 2016

Yeah, looks totally related.

Thanks for the heads up. I'll follow that issue :)

@goto-bus-stop
Copy link
Member

goto-bus-stop commented Mar 13, 2018

appears to be fixed on master. thanks!

console.log(html`<p><input disabled><br></p>`.outerHTML)
// <p><input disabled="disabled"><br></p>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants