diff --git a/src/__template__/ComponentTemplate.vue b/src/__template__/ComponentTemplate.vue index 061eb4d3..804ed869 100644 --- a/src/__template__/ComponentTemplate.vue +++ b/src/__template__/ComponentTemplate.vue @@ -129,10 +129,19 @@ const prefixSvgIdsInString = (svgString: string): string => { return processedSvgString } +const escapeHtml = (str: string): string => { + return str + .replace(//g, '>') + .replace(/"/g, '"') + .replace(/'/g, ''') + .replace(/`/g, ''') +} + // The `svgOriginalContent` template string will be replaced with the SVG innerHTML in the generate script. // eslint-disable-next-line @stylistic/quotes const svgOriginalContent = `{%%ICON_SVG_INNER_HTML%%}` -const svgTitleContent = props.title ? `