util: fix OSC 8 hyperlink stripping in stripVTControlCharacters · nodejs/node@f644853 · GitHub
Skip to content

Commit f644853

Browse files
dushyant-hada-90cursoragent
authored andcommitted
util: fix OSC 8 hyperlink stripping in stripVTControlCharacters
The bundled ansi-regex OSC pattern used a restrictive URI character class that failed when URIs contained RFC 3986-valid characters such as parentheses. Match OSC sequences generically as ESC ] ... ST, aligned with ansi-regex v6.2.0. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: dushyant <dushyanthada90@gmail.com> PR-URL: #64319 Fixes: #64313 Reviewed-By: Aviv Keller <me@aviv.sh>
1 parent 0afda47 commit f644853

2 files changed

Lines changed: 27 additions & 7 deletions

File tree

lib/internal/util/inspect.js

Lines changed: 5 additions & 7 deletions

test/parallel/test-util-stripvtcontrolcharacters.js

Lines changed: 22 additions & 0 deletions

0 commit comments

Comments
 (0)