1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-08 04:09:15 -04:00

fix(Notifications): restore long message content from overflowing

- Addtional security escape patch
- Tweak Notification Center width
This commit is contained in:
purian23
2026-05-31 22:38:50 -04:00
parent b1ac6b0ef9
commit a44bef5796
5 changed files with 21 additions and 14 deletions
@@ -1721,11 +1721,15 @@ Item {
return "";
var idx = text.toLowerCase().indexOf(lowerQuery);
if (idx === -1)
return text;
return _escapeRichText(text);
var before = text.substring(0, idx);
var match = text.substring(idx, idx + queryLen);
var after = text.substring(idx + queryLen);
return '<span style="color:' + baseColor + '">' + before + '</span><span style="color:' + highlightColor + '; font-weight:600">' + match + '</span><span style="color:' + baseColor + '">' + after + '</span>';
return '<span style="color:' + baseColor + '">' + _escapeRichText(before) + '</span><span style="color:' + highlightColor + '; font-weight:600">' + _escapeRichText(match) + '</span><span style="color:' + baseColor + '">' + _escapeRichText(after) + '</span>';
}
function _escapeRichText(text) {
return String(text).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
}
function getCurrentSectionViewMode() {