Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore certain MIME types in fixCharset is not enough #754

Open
lorentz-wu opened this issue Mar 1, 2023 · 0 comments
Open

Ignore certain MIME types in fixCharset is not enough #754

lorentz-wu opened this issue Mar 1, 2023 · 0 comments

Comments

@lorentz-wu
Copy link

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
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant