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:
parent
31358fcf85
commit
e2d56ce62b
@ -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'
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user