SVG: keep width/height attributes for <svg>, fixes #367
Taco de Wolff
3 years ago
141 | 141 |
tag == Svg && (attr == Version && bytes.Equal(val, []byte("1.1")) ||
|
142 | 142 |
attr == X && bytes.Equal(val, zeroBytes) ||
|
143 | 143 |
attr == Y && bytes.Equal(val, zeroBytes) ||
|
144 | |
attr == Width && bytes.Equal(val, n100pBytes) ||
|
145 | |
attr == Height && bytes.Equal(val, n100pBytes) ||
|
146 | 144 |
attr == PreserveAspectRatio && bytes.Equal(val, []byte("xMidYMid meet")) ||
|
147 | 145 |
attr == BaseProfile && bytes.Equal(val, noneBytes) ||
|
148 | 146 |
attr == ContentScriptType && bytes.Equal(val, []byte("application/ecmascript")) ||
|
26 | 26 |
{`<style> <![CDATA[ <<<<< ]]> </style>`, `<style><![CDATA[ <<<<< ]]></style>`},
|
27 | 27 |
{`<style/><![CDATA[ <<<<< ]]>`, `<style/><![CDATA[ <<<<< ]]>`},
|
28 | 28 |
{`<svg version="1.0"></svg>`, `<svg version="1.0"/>`},
|
29 | |
{`<svg version="1.1" x="0" y="0px" width="100%" height="100%"><path/></svg>`, `<svg><path/></svg>`},
|
|
29 |
{`<svg version="1.1" x="0" y="0px" width="100%" height="100%"><path/></svg>`, `<svg width="100%" height="100%"><path/></svg>`},
|
|
30 |
{`<svg width="auto" height="auto"><path/></svg>`, `<svg width="auto" height="auto"><path/></svg>`},
|
30 | 31 |
// TODO: what abour x="" y="" for viewBox?
|
31 | 32 |
//{`<svg width="24" height="24" viewBox="0 0 24 24"></svg>`, `<svg width="24" height="24"/>`},
|
32 | 33 |
{`<path x="a"> </path>`, `<path x="a"/>`},
|