Skip to content

Commit

Permalink
Remove prefix attribute from <html> tag
Browse files Browse the repository at this point in the history
This is not necessary to support the Open Graph Protocol metadata and
can lead to problems with other specifications.

GH-106`
  • Loading branch information
arcticicestudio committed Dec 26, 2018
1 parent abf4318 commit aa1ab35
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/atoms/core/SiteMetadata/SiteMetadata.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PureSiteMetadata = ({
}) => (
<Fragment>
<Helmet defaultTitle={title} titleTemplate={`${title} | %s`}>
<html lang="en" prefix="og: http://ogp.me/ns#" />
<html lang="en" />
<meta content={description} name="description" />
<meta content={author.name} name="author" />
<meta content={Array.from(new Set([...keywordsNord, ...keywordsNordDocs]))} name="keywords" />
Expand Down
11 changes: 0 additions & 11 deletions test/components/atoms/core/SiteMetadata/SiteMetadata.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,6 @@ describe("data consistency", () => {
);
});

test("contains Open Graph Protocol HTML schema `prefix` attribute", () => {
renderWithTheme(<SiteMetadata data={staticQueryResultDataMock} pathName="/" />);
const generatedHelmetData = Helmet.peek();

expect(generatedHelmetData.htmlAttributes).toEqual(
expect.objectContaining({
prefix: expect.stringContaining("ogp.me")
})
);
});

test("contains JSON-LD schema linked data `script` tag", () => {
renderWithTheme(<SiteMetadata data={staticQueryResultDataMock} pathName="/" />);
const generatedHelmetData = Helmet.peek();
Expand Down

0 comments on commit aa1ab35

Please sign in to comment.