mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
better method name
This commit is contained in:
@@ -79,7 +79,7 @@ public class HtmlFileType extends XmlLikeFileType {
|
||||
catch (UnsupportedEncodingException e) {
|
||||
return null;
|
||||
}
|
||||
Charset c = HtmlUtil.detectCharsetFromMetaHttpEquiv(strContent);
|
||||
Charset c = HtmlUtil.detectCharsetFromMetaTag(strContent);
|
||||
return c == null ? null : c.name();
|
||||
}
|
||||
|
||||
@@ -91,6 +91,6 @@ public class HtmlFileType extends XmlLikeFileType {
|
||||
if (charset != null) {
|
||||
return charset;
|
||||
}
|
||||
return HtmlUtil.detectCharsetFromMetaHttpEquiv(content);
|
||||
return HtmlUtil.detectCharsetFromMetaTag(content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ public class HtmlUtil {
|
||||
private static final TerminateException INSTANCE = new TerminateException();
|
||||
}
|
||||
|
||||
public static Charset detectCharsetFromMetaHttpEquiv(@NotNull String content) {
|
||||
public static Charset detectCharsetFromMetaTag(@NotNull String content) {
|
||||
// check for <meta http-equiv="charset=CharsetName" > or <meta charset="CharsetName"> and return Charset
|
||||
// because we will lightly parse and explicit charset isn't used very often do quick check for applicability
|
||||
int charPrefix = content.indexOf(CHARSET);
|
||||
|
||||
Reference in New Issue
Block a user