Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/json: stop escaping U+2028 and U+2029 in Compact #34804

Closed
wants to merge 1 commit into from
Closed

encoding/json: stop escaping U+2028 and U+2029 in Compact #34804

wants to merge 1 commit into from

Conversation

tmthrgd
Copy link
Contributor

@tmthrgd tmthrgd commented Oct 10, 2019

Compact has been inconsistently escaping only some problematic characters
(U+2028 and U+2029), but not others (<, > and &). This change addresses
this inconsistency by removing the escaping of U+2028 and U+2029.

Callers who need to escape the output of Compact should use HTMLEscape
which escapes <, >, &, U+2028 and U+2029.

Fixes #34070
Fixes #30357
Updates #5836

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Oct 10, 2019
@gopherbot
Copy link

This PR (HEAD: 38859fe) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/200217 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link

Message from Daniel Martí:

Patch Set 1: Run-TryBot+1 Code-Review+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/200217.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 1:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=efc69edd


Please don’t reply on this GitHub thread. Visit golang.org/cl/200217.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 1: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/200217.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Tom Thorogood:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/200217.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Daniel Martí:

Patch Set 2: Run-TryBot+1 Code-Review+2

Noone objected to my suggestion to try this for 1.14 in over two weeks, so let's go ahead.


Please don’t reply on this GitHub thread. Visit golang.org/cl/200217.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 2:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=d0f12430


Please don’t reply on this GitHub thread. Visit golang.org/cl/200217.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link

Message from Gobot Gobot:

Patch Set 2: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/200217.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Oct 10, 2019
Compact has been inconsistently escaping only some problematic characters
(U+2028 and U+2029), but not others (<, > and &). This change addresses
this inconsistency by removing the escaping of U+2028 and U+2029.

Callers who need to escape the output of Compact should use HTMLEscape
which escapes <, >, &, U+2028 and U+2029.

Fixes #34070
Fixes #30357
Updates #5836

Change-Id: Icfce7691d2b8b1d9b05ba7b64d2d1e4f3b67871b
GitHub-Last-Rev: 38859fe
GitHub-Pull-Request: #34804
Reviewed-on: https://go-review.googlesource.com/c/go/+/200217
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@gopherbot
Copy link

This PR is being closed because golang.org/cl/200217 has been merged.

@gopherbot gopherbot closed this Oct 10, 2019
@tmthrgd tmthrgd deleted the json-compact-escape branch October 10, 2019 11:57
clarketm pushed a commit to clarketm/json that referenced this pull request Nov 9, 2019
Compact has been inconsistently escaping only some problematic characters
(U+2028 and U+2029), but not others (<, > and &). This change addresses
this inconsistency by removing the escaping of U+2028 and U+2029.

Callers who need to escape the output of Compact should use HTMLEscape
which escapes <, >, &, U+2028 and U+2029.

Fixes #34070
Fixes #30357
Updates #5836

Change-Id: Icfce7691d2b8b1d9b05ba7b64d2d1e4f3b67871b
GitHub-Last-Rev: 38859fe3e2fd586bbd45175c2742f7b123836bf3
GitHub-Pull-Request: golang/go#34804
Reviewed-on: https://go-review.googlesource.com/c/go/+/200217
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
e-nikolov pushed a commit to e-nikolov/json that referenced this pull request Nov 25, 2021
Compact has been inconsistently escaping only some problematic characters
(U+2028 and U+2029), but not others (<, > and &). This change addresses
this inconsistency by removing the escaping of U+2028 and U+2029.

Callers who need to escape the output of Compact should use HTMLEscape
which escapes <, >, &, U+2028 and U+2029.

Fixes #34070
Fixes #30357
Updates #5836

Change-Id: Icfce7691d2b8b1d9b05ba7b64d2d1e4f3b67871b
GitHub-Last-Rev: 38859fe3e2fd586bbd45175c2742f7b123836bf3
GitHub-Pull-Request: golang/go#34804
Reviewed-on: https://go-review.googlesource.com/c/go/+/200217
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
e-nikolov pushed a commit to e-nikolov/json that referenced this pull request Nov 25, 2021
Compact has been inconsistently escaping only some problematic characters
(U+2028 and U+2029), but not others (<, > and &). This change addresses
this inconsistency by removing the escaping of U+2028 and U+2029.

Callers who need to escape the output of Compact should use HTMLEscape
which escapes <, >, &, U+2028 and U+2029.

Fixes #34070
Fixes #30357
Updates #5836

Change-Id: Icfce7691d2b8b1d9b05ba7b64d2d1e4f3b67871b
GitHub-Last-Rev: 38859fe3e2fd586bbd45175c2742f7b123836bf3
GitHub-Pull-Request: golang/go#34804
Reviewed-on: https://go-review.googlesource.com/c/go/+/200217
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
e-nikolov pushed a commit to e-nikolov/json that referenced this pull request Nov 25, 2021
Compact has been inconsistently escaping only some problematic characters
(U+2028 and U+2029), but not others (<, > and &). This change addresses
this inconsistency by removing the escaping of U+2028 and U+2029.

Callers who need to escape the output of Compact should use HTMLEscape
which escapes <, >, &, U+2028 and U+2029.

Fixes #34070
Fixes #30357
Updates #5836

Change-Id: Icfce7691d2b8b1d9b05ba7b64d2d1e4f3b67871b
GitHub-Last-Rev: 38859fe3e2fd586bbd45175c2742f7b123836bf3
GitHub-Pull-Request: golang/go#34804
Reviewed-on: https://go-review.googlesource.com/c/go/+/200217
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

encoding/json: Compact should be consistent with escaping encoding/json: Compact escapes U+2028 and U+2029
3 participants