Skip to content

Commit 9b1f0a9

Browse files
Merge pull request #92 from OneBusAway/release-please--branches--main--changes--next
release: 1.4.0
2 parents 45852d1 + 911d1c3 commit 9b1f0a9

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.3.5"
2+
".": "1.4.0"
33
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.4.0 (2025-08-07)
4+
5+
Full Changelog: [v1.3.5...v1.4.0](https://github.com/OneBusAway/go-sdk/compare/v1.3.5...v1.4.0)
6+
7+
### Features
8+
9+
* **client:** support optional json html escaping ([d21339b](https://github.com/OneBusAway/go-sdk/commit/d21339b44a11fbad489b5e2e71404b7335b32c55))
10+
311
## 1.3.5 (2025-07-22)
412

513
Full Changelog: [v1.3.4...v1.3.5](https://github.com/OneBusAway/go-sdk/compare/v1.3.4...v1.3.5)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Or to pin the version:
2424
<!-- x-release-please-start-version -->
2525

2626
```sh
27-
go get -u 'github.com/OneBusAway/go-sdk@v1.3.5'
27+
go get -u 'github.com/OneBusAway/go-sdk@v1.4.0'
2828
```
2929

3030
<!-- x-release-please-end -->

internal/requestconfig/requestconfig.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,13 @@ func NewRequestConfig(ctx context.Context, method string, u string, body interfa
133133
// Fallback to json serialization if none of the serialization functions that we expect
134134
// to see is present.
135135
if body != nil && !hasSerializationFunc {
136-
content, err := json.Marshal(body)
137-
if err != nil {
136+
buf := new(bytes.Buffer)
137+
enc := json.NewEncoder(buf)
138+
enc.SetEscapeHTML(true)
139+
if err := enc.Encode(body); err != nil {
138140
return nil, err
139141
}
140-
reader = bytes.NewBuffer(content)
142+
reader = buf
141143
}
142144

143145
req, err := http.NewRequestWithContext(ctx, method, u, nil)

internal/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
package internal
44

5-
const PackageVersion = "1.3.5" // x-release-please-version
5+
const PackageVersion = "1.4.0" // x-release-please-version

0 commit comments

Comments
 (0)