forked from Qortal/qortal
Add <meta charset="UTF-8"> tag to websites. Fixed issue rendering emojis and other special characters.
This commit is contained in:
parent
8673c7ef6e
commit
a2c462b3da
@ -28,6 +28,11 @@ public class HTMLParser {
|
|||||||
// Add base href tag
|
// Add base href tag
|
||||||
String baseElement = String.format("<base href=\"%s\">", baseUrl);
|
String baseElement = String.format("<base href=\"%s\">", baseUrl);
|
||||||
head.get(0).prepend(baseElement);
|
head.get(0).prepend(baseElement);
|
||||||
|
|
||||||
|
// Add meta charset tag
|
||||||
|
String metaCharsetElement = "<meta charset=\"UTF-8\">";
|
||||||
|
head.get(0).prepend(metaCharsetElement);
|
||||||
|
|
||||||
}
|
}
|
||||||
String html = document.html();
|
String html = document.html();
|
||||||
this.data = html.getBytes();
|
this.data = html.getBytes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user