Compare commits
No commits in common. "5265bcd77ad39128872d7ffe84b8d201d0e50670" and "b4c26f81060fe944979d555b7dbb811b2e8863d3" have entirely different histories.
5265bcd77a
...
b4c26f8106
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "multi-hoster-uploader",
|
||||
"version": "2.9.0",
|
||||
"version": "2.8.9",
|
||||
"description": "Upload files to doodstream, voe, vidmoly, byse simultaneously",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
@ -3819,21 +3819,14 @@ function setupColumnResizing() {
|
||||
});
|
||||
}
|
||||
|
||||
// Single-pass escape instead of 4 chained .replace(/x/g, ...) calls.
|
||||
// Hot path on large table rebuilds — every text cell runs through one of these.
|
||||
const _HTML_ESC_MAP = { '&': '&', '<': '<', '>': '>', '"': '"' };
|
||||
const _HTML_ESC_RE = /[&<>"]/g;
|
||||
const _ATTR_ESC_MAP = { '&': '&', '"': '"', "'": ''' };
|
||||
const _ATTR_ESC_RE = /[&"']/g;
|
||||
|
||||
function escapeHtml(str) {
|
||||
if (!str) return '';
|
||||
return String(str).replace(_HTML_ESC_RE, (c) => _HTML_ESC_MAP[c]);
|
||||
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||
}
|
||||
|
||||
function escapeAttr(str) {
|
||||
if (!str) return '';
|
||||
return String(str).replace(_ATTR_ESC_RE, (c) => _ATTR_ESC_MAP[c]);
|
||||
return String(str).replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''');
|
||||
}
|
||||
|
||||
function showCopyToast(msg) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user