Commit Graph

3 Commits

Author SHA1 Message Date
Catriel Müller 2aa1b95074 refactor: resolve comments 2026-05-18 11:45:36 -03:00
Catriel Müller a0dcf76177 fix(cli): strip trailing sentence punctuation from URL matches in normalizeUrls
\S+ was greedily consuming trailing punctuation (. ! , ;) into the URL
match, causing new URL() to mutate clean ASCII URLs — e.g.
"see https://example.com." became "see https://example.com./".

Fix: strip trailing sentence punctuation before parsing, extract and
replace only the hostname (not href) to avoid adding trailing slashes to
bare origins, and restore the stripped tail afterward.
2026-05-11 13:18:49 -03:00
Catriel Müller 9064478949 test(cli): add unit tests for normalizeUrls homograph protection 2026-05-11 12:55:08 -03:00