colly icon indicating copy to clipboard operation
colly copied to clipboard

Ignore certain MIME types in fixCharset is not enough

Open lorentz-wu opened this issue 1 year ago • 0 comments

Ignore certain MIME types in fixCharset is not enough, now only ignore video, image etc, but there are have some mime type should be ignore, for example, doc, pdf, xlsx ... application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document,

in func fixCharset () ... if strings.Contains(contentType, "image/") || strings.Contains(contentType, "video/") || strings.Contains(contentType, "audio/") || strings.Contains(contentType, "font/") { // These MIME types should not have textual data.

	return nil
}

should be fixed

if !strings.Constins(contentType, "text/") { return nil }

lorentz-wu avatar Mar 01 '23 09:03 lorentz-wu