harlan-zw / nuxt-site-config

Unifying site config with powerful and flexible APIs, for module authors and users.
https://nuxtseo.com/site-config
61 stars 3 forks source link

How to allow character '&' without convert to '&' #28

Closed aichukanov closed 3 months ago

aichukanov commented 3 months ago

Details

Trying to create a sitemap with links with query parameters, but I'm getting links with converted ampersands

code:

        loc: url + (brandId ? `?brand=${brandId}` : ''),
        alternatives: langs.map((lang) => ({
            hreflang: lang,
            href: `${url}?lang=${lang}${brandId ? `&brand=${brandId}` : ''}`,
        })),

result:

...
        <xhtml:link rel="alternate" hreflang="en" href="mysite/fans?lang=en&amp;brand=145" />
...
aichukanov commented 3 months ago

Looks like it should be correctly parsed by search engines.