mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-30 08:42:00 +00:00 
			
		
		
		
	grammars : blacklists character control set (#5888)
* Prevent control characters from being served in json string * Prevent control characters from being served in json string (array)
This commit is contained in:
		| @@ -15,7 +15,7 @@ array  ::= | ||||
|  | ||||
| string ::= | ||||
|   "\"" ( | ||||
|     [^"\\] | | ||||
|     [^"\\\x7F\x00-\x1F] | | ||||
|     "\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes | ||||
|   )* "\"" ws | ||||
|  | ||||
|   | ||||
| @@ -24,7 +24,7 @@ array  ::= | ||||
|  | ||||
| string ::= | ||||
|   "\"" ( | ||||
|     [^"\\] | | ||||
|     [^"\\\x7F\x00-\x1F] | | ||||
|     "\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes | ||||
|   )* "\"" ws | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 ExtReMLapin
					ExtReMLapin