We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 554890e commit 39f1cdbCopy full SHA for 39f1cdb
src/helpers.js
@@ -123,10 +123,10 @@ export const svgToUri = (svg) => {
123
var source = serializer.serializeToString(svg);
124
125
// Add namespace.
126
- if(!source.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/)){
+ if(!source.match(/^<svg[^>]+xmlns="http:\/\/www\.w3\.org\/2000\/svg"/)){
127
source = source.replace(/^<svg/, '<svg xmlns="http://www.w3.org/2000/svg"');
128
}
129
- if(!source.match(/^<svg[^>]+"http\:\/\/www\.w3\.org\/1999\/xlink"/)){
+ if(!source.match(/^<svg[^>]+"http:\/\/www\.w3\.org\/1999\/xlink"/)){
130
source = source.replace(/^<svg/, '<svg xmlns:xlink="http://www.w3.org/1999/xlink"');
131
132
0 commit comments