diff --git a/packages/easy-sitemap/src/Sitemap.ts b/packages/easy-sitemap/src/Sitemap.ts index c44f3ae..7a49362 100644 --- a/packages/easy-sitemap/src/Sitemap.ts +++ b/packages/easy-sitemap/src/Sitemap.ts @@ -68,10 +68,10 @@ export default class Sitemap { } entryString += '' entryString += `${this.fixText(image.location.startsWith('/') ? `${this.domain}${image.location}` : image.location)}` - entryString += this.fixText(this.optionalEntry('image:caption', image.caption)) - entryString += this.fixText(this.optionalEntry('image:geo_location', image.geoLocation)) - entryString += this.fixText(this.optionalEntry('image:title', image.title)) - entryString += this.fixText(this.optionalEntry('image:license', image.license)) + entryString += this.optionalEntry('image:caption', image.caption) + entryString += this.optionalEntry('image:geo_location', image.geoLocation) + entryString += this.optionalEntry('image:title', image.title) + entryString += this.optionalEntry('image:license', image.license) entryString += '' } } @@ -98,7 +98,7 @@ export default class Sitemap { } private optionalEntry(tag: string, entry?: string) { - return entry ? `<${tag}>${entry}` : '' + return entry ? `<${tag}>${this.fixText(entry)}` : '' } private fixText(txt: string): string {