aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/handleBans.ts
AgeCommit message (Collapse)Author
4 daysRemove safeTags, decodeChat, and prepChatOsmium Sorcerer
Following the removal of innerHTML manipulation, we no longer need these sanitization functions. I've reviewed every safeTags call site to make sure the outputs don't end up anywhere unsafe, and malicious input can't malipulate DOM or execute code. These values either end up either as plain text (textContent, innerText, createTextNode, title, option) or as a URL path to request assets to the server (encoded using encodeURI). That is, if safeTags was even effective, considering all that function did was replace '<' and '>' symbols with Unicode lookalikes. Even the comment was suggesting the use of fundamentally safer functions instead of these hacks. Replace remaining uses of prepChat with unescapeChat as we still need to do the token substitution (like "<and>" to "&"). decodeChat was escaping Unicode sequences like \uXXXX, but I don't see the reason for this, AO2 Client doesn't have this feature, and considering WebSocket text frames are strictly UTF-8, we don't need these encodings.
4 daysEliminate innerHTML manipulationOsmium Sorcerer
Construct DOM nodes directly instead of trying to sanitize every input string and dynamically updating HTML. Replace all uses of innerHTML with textContent, replaceChildren, and appendChild. This removes the need to use safeTags and replace newlines, but now requires preserving whitespace via CSS pre-wrap. Every OOC chat line is now placed into its own element instead of simply being appended to the log. This might be worse, and createTextNode is another alternative.
4 daysAvoid bothering the upstreamOsmium Sorcerer
Delete reference to the AO2 Discord server so users don't accidentally complain there if I break something here.
2026-04-18hide confusing text for banned playersstonedDiscord
2026-03-24no double noticeDavid Skoland
2026-03-24Add reconnect UI, disconnect button, and visual cleanupDavid Skoland
- Redesign disconnect overlay as a full-screen modal with dark backdrop - Add working Reconnect button that properly re-establishes WebSocket connection - Add Disconnect button in Settings for testing - Separate disconnect and ban/kick codepaths (no reconnect on ban) - Log disconnect notice in IC log using hrtext style - Refactor area list rendering from client state (renderAreaList) - Extract appendICNotice for reusable IC log notices - Clean up charselect: hide during loading, simplify toolbar layout - Freshen loading screen and charselect styling - Remove loading progress text updates (just show "Loading...") - Guard against undefined client.chars and client.serv Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2024-12-12get rid of sageTags in a few placesstonedDiscord
plan is to migrate to createTextNode
2024-11-20Prettified Code!stonedDiscord
2023-04-04fix reconnect buttonstonedDiscord
2023-03-25make it clearer what happenedstonedDiscord
2022-09-09Pulled out everything I wantedCaleb