mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
fix(core): introduce SafeRegExp
to primordials (#17592)
This commit is contained in:
parent
6ffbf8a941
commit
55833cf799
15 changed files with 171 additions and 60 deletions
|
@ -32,6 +32,7 @@ const {
|
|||
ObjectEntries,
|
||||
RegExpPrototypeTest,
|
||||
SafeArrayIterator,
|
||||
SafeRegExp,
|
||||
Symbol,
|
||||
SymbolFor,
|
||||
SymbolIterator,
|
||||
|
@ -88,7 +89,7 @@ function fillHeaders(headers, object) {
|
|||
|
||||
// Regex matching illegal chars in a header value
|
||||
// deno-lint-ignore no-control-regex
|
||||
const ILLEGAL_VALUE_CHARS = /[\x00\x0A\x0D]/;
|
||||
const ILLEGAL_VALUE_CHARS = new SafeRegExp(/[\x00\x0A\x0D]/);
|
||||
|
||||
/**
|
||||
* https://fetch.spec.whatwg.org/#concept-headers-append
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue