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

zio.http.internal.OutputEncoder does not correctly encode '&' char #3224

Open
kadriaen-bb opened this issue Nov 30, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@kadriaen-bb
Copy link

kadriaen-bb commented Nov 30, 2024

Describe the bug
zio.http.internal.OutputEncoder does not correctly encode '&' char.
It encodes it as &amp instead of & (missing ';' char).
This causes url's in href attributes to get garbled.

To Reproduce
render a zio template containing:

a(
   href := "http://www.myservice.com?param1=v1&param2=v2",
   s"Click here"
)

this renders the href like:
href = "http://www.myservice.com?param1=v1&ampparam2=v2"
(missing ';' at the end of '&amp')

Expected behaviour
html code showing the href rendered like:
href = "http://www.myservice.com?param1=v1&param2=v2"

Screenshots

Desktop (please complete the following information):

  • OS: OSX
  • Browser: any
  • Version 3.0.1

Smartphone (please complete the following information):
Any

Additional context
None

@kadriaen-bb kadriaen-bb added the bug Something isn't working label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant