aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/tdewolff/minify/xml/xml.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/tdewolff/minify/xml/xml.go')
-rw-r--r--vendor/github.com/tdewolff/minify/xml/xml.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/vendor/github.com/tdewolff/minify/xml/xml.go b/vendor/github.com/tdewolff/minify/xml/xml.go
index 7974484..9486e34 100644
--- a/vendor/github.com/tdewolff/minify/xml/xml.go
+++ b/vendor/github.com/tdewolff/minify/xml/xml.go
@@ -43,6 +43,9 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, _ map[string]st
for {
t := *tb.Shift()
if t.TokenType == xml.CDATAToken {
+ if len(t.Text) == 0 {
+ continue
+ }
if text, useText := xml.EscapeCDATAVal(&attrByteBuffer, t.Text); useText {
t.TokenType = xml.TextToken
t.Data = text