Remove stray character

This commit is contained in:
Raymond Hill 2025-10-04 12:53:07 -04:00
parent 0d4f55ff30
commit 4ee38a056e
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -97,7 +97,7 @@ function hrefSanitizer(
}
if ( source === 'text' ) {
return elem.textContent
.replace(/^[^\x21-\x7e]+|/, '') // remove leading invalid characters
.replace(/^[^\x21-\x7e]+/, '') // remove leading invalid characters
.replace(/[^\x21-\x7e]+$/, ''); // remove trailing invalid characters
}
const steps = source.replace(/(\S)\?/g, '\\1 ?').split(/\s+/);