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

Enforce Dev UI charset to UTF-8 #38653

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public static interface FileExtension {
}

public static interface MimeType {
public static final String HTML = "text/html";
public static final String JS = "text/javascript";
public static final String HTML = "text/html; charset=utf-8";
public static final String JS = "text/javascript; charset=utf-8";
public static final String JSON = "application/json";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default charset for application/json is supposed to be UTF-8.

public static final String CSS = "text/css";
public static final String PLAIN = "text/plain";
public static final String CSS = "text/css; charset=utf-8";
public static final String PLAIN = "text/plain; charset=utf-8";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ private String getContentType(String filename) {

private static final String CONTENT_TYPE_JAVASCRIPT = "application/javascript";
private static final String CONTENT_TYPE_JSON = "application/json";
private static final String CONTENT_TYPE_HTML = "text/html";
private static final String CONTENT_TYPE_XHTML = "application/xhtml+xml";
private static final String CONTENT_TYPE_XML = "application/xml";
private static final String CONTENT_TYPE_CSS = "text/css";
private static final String CONTENT_TYPE_TEXT = "text/plain";
private static final String CONTENT_TYPE_HTML = "text/html; charset=utf-8";
private static final String CONTENT_TYPE_XHTML = "application/xhtml+xml; charset=utf-8";
private static final String CONTENT_TYPE_XML = "application/xml; charset=utf-8";
private static final String CONTENT_TYPE_CSS = "text/css; charset=utf-8";
private static final String CONTENT_TYPE_TEXT = "text/plain; charset=utf-8";

}
Loading