-
Notifications
You must be signed in to change notification settings - Fork 46k
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
DOM attribute dateTime isn't lowercased when rendered to string #11492
Comments
Note that some tests will fail due to facebook/react#11492
This is a duplicate of #10863. We’re hesitant about this. HTML is case-insensitive so technically our behavior is correct even if a little surprising. There's absolutely nothing wrong with emitting attributes with any casing, even Though we potentially can “fix” this to be less surprising (#11110) we’re not confident it won’t lead to a slight performance regression. So it might not be worth it. We’d need data from people using SSR in production to tell if this would be a problem or not. |
The attribute "charset" was considered an error, but it results in valid HTML because HTML is case-insensitive. In other words, these two lines will be interpreted in the same way: <meta charSet="utf-8" /> <meta charset="utf-8" /> facebook/react#11492 (comment)
The attribute "charset" was considered an error, but it results in valid HTML because HTML is case-insensitive. In other words, these two lines will be interpreted in the same way: <meta charSet="utf-8" /> <meta charset="utf-8" /> facebook/react#11492 (comment)
The attribute "charset" was considered an error, but it results in valid HTML because HTML is case-insensitive. In other words, these two lines will be interpreted in the same way: <meta charSet="utf-8" /> <meta charset="utf-8" /> facebook/react#11492 (comment)
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
The DOM property
dateTime
isn't converted to its lowercase attribute counterpartdatetime
for the<time>
element when the element is rendered withReactDOMServer.renderToString()
.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template for React 16: https://jsfiddle.net/Luktwrdm/, template for React 15: https://jsfiddle.net/hmbg7e9w/).
The above will print
<time dateTime="2017-11-02T20:49:25+01:00" data-reactroot=""></time>
.What is the expected behavior?
The above output should be
<time datetime="2017-11-02T20:49:25+01:00" data-reactroot=""></time>
.Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16.0.0
React DOM 16.0.0
Node v6.11.5
The text was updated successfully, but these errors were encountered: