Skip to content

Commit

Permalink
fix: encode canonical link to match actual link URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
shauke committed Apr 3, 2023
1 parent c07edca commit f3ac967
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/extensions/seo/store/seo/seo.effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class SeoEffects {
private setCanonicalLink(url: string) {
// the canonical URL of a production system should always be with 'https:'
// even though the PWA SSR container itself is usually not deployed in an SSL environment so the URLs need manual adaption
const canonicalUrl = url.replace('http:', 'https:');
const canonicalUrl = encodeURI(url.replace('http:', 'https:'));
let canonicalLink = this.doc.querySelector('link[rel="canonical"]');
if (!canonicalLink) {
canonicalLink = this.doc.createElement('link');
Expand Down

0 comments on commit f3ac967

Please sign in to comment.