mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
decodeHtmlEntities only handled decimal numeric character references (é); the equally valid hexadecimal form (é) fell through undecoded and surfaced as raw text in titles, companies, locations and descriptions. It also used String.fromCharCode, which corrupts supplementary-plane code points (e.g. emoji, U+1F600). Add a hexadecimal numeric-entity rule and route both decimal and hex through a fromCodePoint-based helper with a valid-range guard. Add network-free unit tests covering hex, uppercase-X hex, decimal (regression) and astral code points via the exported parse functions.