-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Describe the bug
unescape function produce incorrect result when the intermediate string generated includes an escape sequence.
Examples
const validator = require('validator');
validator.unescape(validator.escape('<'))
// Expected: '<'
// Actual: '<'
Demo: Stackblitz
Additional context
Validator.js version: 13.6.0
Node.js version: 14.16.0
OS platform: linux, macOS
Suggested solution
& -> & transform should be the last transform in unescape.
Demo: Stackblitz