react-helmet icon indicating copy to clipboard operation
react-helmet copied to clipboard

Hreflang link (SSR) is in camelCase

Open Tomas2D opened this issue 3 years ago • 2 comments

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

What is the current behavior? Helmet.renderStatic() (SSR) produces different output than in SPA.

// App.jsx
...
<Helmet>
      <link rel="alternate" hrefLang={"en"} href={"https://example.com"} />
</Helmet>
...
// HTML from SSR
<link data-react-helmet="true" rel="alternate" **hrefLang**="en" href="https://example.com"/>
// HTML after hydration
<link data-react-helmet="true" rel="alternate" **hreflang**="en" href="https://example.com"/>

Hreflang should be in lowercase, not in camelCase.

Minimal demo of the problem

GitHub repository

What is the expected behavior?

Helmet.renderStatic() for links (Helmet.renderStatic().link.toString()) should give same result as user gets after hydratation.

Which versions of React and react-helmet, and which browser / OS are affected by this issue?

react-helmet: 6.1.0 react: 17.0.2

Tomas2D avatar Aug 24 '21 15:08 Tomas2D

Any progress on this?

Tomas2D avatar Jan 05 '22 15:01 Tomas2D

bump

Tomas2D avatar Jul 16 '22 15:07 Tomas2D