Commit 797c2f7
committed
Limit number precision to 21 digits in JSONSanitizer
Addresses the TODO at line 327 by capping the number of significant digits collected during number canonicalization to 21. This aligns with standard JS number string formatting (ECMA-262) and prevents excessively long number strings in sanitized JSON. Numbers with more than 21 significant digits will have their precision truncated to 21 digits before being formatted (typically into scientific notation by subsequent logic).1 parent 258c0e9 commit 797c2f7
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
0 commit comments