fix: admin energy.js escapeHtml 补充单引号转义

- escapeHtml 新增 .replace(/'/g, ''') 处理单引号
- 管理后台能量流水中的单引号内容现在能正确转义显示
This commit is contained in:
2026-06-02 18:35:10 +08:00
parent 77d8562916
commit a83e0840d7

View File

@ -194,7 +194,7 @@
function escapeHtml(text) {
if (!text) return '';
return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;');
}
function showMsg(msgEl, text, type) {