2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-09 14:50:56 +00:00

Utils: remove new lines when encoding SVG for URL

This commit is contained in:
Vjacheslav Trushkin 2022-05-01 08:35:34 +03:00
parent 31358fcf85
commit e2d56ce62b

View File

@ -18,6 +18,7 @@ export function encodeSVGforURL(svg: string): string {
// .replace(/}/g, '%7D') // not needed in string inside double quotes
.replace(/</g, '%3C')
.replace(/>/g, '%3E')
.replace(/\s+/g, ' ') // Replace all whitespace with space to get rid of '\r', '\n' and '\t'
);
}