0

I'm using Angular build in Meta tag setter for my open graph tags.

The code is rendered server-side with Angular Universal

import { Title, Meta } from '@angular/platform-browser';
...
export class MetaTagsService {
  constructor(
    private metaTagSetter: Meta,
   ...
)

this.metaTagSetter.updateTag({ property: 'og:image', url:`${page.ogData.imgUrl}` });

but when pass something like this for page.ogData.imgUrl:

https://somedomain.com?param=123&param2=345

it ends like that in the output

https://somedomain.com?param=123&param2=345

In other words, the sanitizer edit the &

How can avoid that behavior?

Kaloyan Stamatov
  • 3,894
  • 1
  • 20
  • 30

0 Answers0