solidjs / solid-meta

Write meta tags to the document head
127 stars 16 forks source link

Meta tags overwriting each other #22

Open nipatiitti opened 1 year ago

nipatiitti commented 1 year ago

Reproduced example: https://stackblitz.com/edit/solidjs-templates-zamsr7?file=src/App.tsx

Code

<Meta http-equiv="X-UA-Compatible" content="IE=edge" />
<Meta charset="utf-8" />

Expected behavior

Both meta tags render in the <head /> as would happen if you do:

<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<meta charset="utf-8" >

Observed behavior

Only the latter of the 2 meta tags is rendered and the other just disappears.

yume-chan commented 1 year ago

Looks like this library only handles <meta> tags that have a name attribute.

For projects using Solid-Start, the <HttpHeader> component (https://start.solidjs.com/api/HttpHeader) might be used in place of <Meta http-equiv> to partially workaround this.