- add Formatter.JSONEscapeHTML and SetJSONEscapeHTML to let JSON writers preserve HTML-sensitive characters when needed while keeping escaping enabled by default. - switch JSON output to json.Encoder, preserve existing Print/Println newline semantics, and cover the new escaping behavior in tests.
This commit is contained in:
@@ -1,3 +1,26 @@
|
||||
# v2.3.0
|
||||
|
||||
This release adds JSON HTML-escaping control while preserving the existing
|
||||
JSON writer defaults and newline semantics.
|
||||
|
||||
### Added
|
||||
|
||||
- Added `Formatter.SetJSONEscapeHTML(bool)` and `Formatter.JSONEscapeHTML` to control whether JSON writers escape HTML-sensitive characters such as `<`, `>`, and `&`.
|
||||
|
||||
### Changed
|
||||
|
||||
- JSON writers now use `json.Encoder` internally so formatter-level HTML escaping can be configured.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Preserved `Print` and `Println` newline behavior for JSON output while switching to `json.Encoder`.
|
||||
|
||||
### Compatibility
|
||||
|
||||
- No breaking API changes.
|
||||
- HTML escaping remains enabled by default, matching the previous `encoding/json` behavior.
|
||||
- `Print` still emits JSON without an added newline, and `Println` emits exactly one trailing newline.
|
||||
|
||||
# v2.2.0
|
||||
|
||||
This release expands the public LogLevel API, adds optional threshold-based
|
||||
|
||||
Reference in New Issue
Block a user