mirror of
https://github.com/matrix-construct/construct
synced 2025-03-16 22:41:46 +01:00
ircd::json: Stricter escape conditions in string values.
This commit is contained in:
parent
1846dd379d
commit
503ab33c38
1 changed files with 3 additions and 3 deletions
|
@ -86,13 +86,13 @@ struct ircd::json::input
|
|||
|
||||
rule<> escaped
|
||||
{
|
||||
lit('"') | lit('\\') | lit('\b') | lit('\f') | lit('\n') | lit('\r') | lit('\t')
|
||||
lit('"') | lit('\\') | lit('\b') | lit('\f') | lit('\n') | lit('\r') | lit('\t') | lit('\0')
|
||||
,"escaped"
|
||||
};
|
||||
|
||||
rule<> escaper
|
||||
{
|
||||
lit('"') | lit('\\') | lit('b') | lit('f') | lit('n') | lit('r') | lit('t') | unicode
|
||||
lit('"') | lit('\\') | lit('b') | lit('f') | lit('n') | lit('r') | lit('t') | lit('0') | unicode
|
||||
,"escaped"
|
||||
};
|
||||
|
||||
|
@ -103,7 +103,7 @@ struct ircd::json::input
|
|||
|
||||
rule<string_view> chars
|
||||
{
|
||||
raw[*((char_ - (escape | quote)) | (escape >> escaper_nc))]
|
||||
raw[*((char_ - escaped) | (escape >> escaper_nc))]
|
||||
,"characters"
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue