Skip to content

Double Quotes Not Escaped within Head #2362

Open
@AngadSethi

Description

@AngadSethi

Version:

  • @inertiajs/vue3 version: 2.0.11

Describe the problem:

When rendering <Head> meta tags server-side (SSR), attribute values containing double quotes (for example, in the content attribute of a <meta> tag) are not escaped.

This results in invalid HTML output such as <meta name="description" content="This is the "best" book.">.

Steps to reproduce:

  1. Use the <Head> component with a prop containing a double quote, e.g.:
    <Head>
        <meta name="description" content='This is the "best" example' />
    </Head>
  2. Render a page server-side.
  3. View the page source.
  4. Observe that the resulting HTML contains unescaped double quotes:
    <meta name="description" content="This is the "best" example.">
  5. Expected behaviour is for the SSR output to escape the double quotes, e.g.:
    <meta name="description" content="This is the &quot;best&quot; example.">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions