mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-08 18:17:43 +00:00
fix: weird unicode char
This commit is contained in:
+5
-3
@@ -17,9 +17,11 @@ const renderError = (message) => {
|
||||
|
||||
// https://stackoverflow.com/a/48073476/10629172
|
||||
function encodeHTML(str) {
|
||||
return str.replace(/[\u00A0-\u9999<>&](?!#)/gim, function (i) {
|
||||
return "&#" + i.charCodeAt(0) + ";";
|
||||
});
|
||||
return str
|
||||
.replace(/[\u00A0-\u9999<>&](?!#)/gim, (i) => {
|
||||
return "&#" + i.charCodeAt(0) + ";";
|
||||
})
|
||||
.replace(/\u0008/gim, "");
|
||||
}
|
||||
|
||||
function kFormatter(num) {
|
||||
|
||||
Reference in New Issue
Block a user