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

Escape HTML in curl query #1514

Closed
mgttlinger opened this issue Aug 5, 2015 · 3 comments
Closed

Escape HTML in curl query #1514

mgttlinger opened this issue Aug 5, 2015 · 3 comments

Comments

@mgttlinger
Copy link
Contributor

If there is HTML code in a string in a parameter example of a request it is not escaped properly in the curl query. For example

{
  "description": "<b>Test</b>"
}

is rendered as
{
\"decription\": \"Test\"
}

@LuissRicardo
Copy link

I'm having a similar issue, with XML.

I've tried with double backslash () before the special symbols, unsuccessfully.

{
"param1": 234,
"param2": "string", 
"xml": "\\<element name\\=\\"Simple\\" color\\=\\"blue\\" \\/>"
}

@fehguy
Copy link
Contributor

fehguy commented Jun 16, 2016

tested in swagger-api/swagger-js@c8c1cfc

@fehguy
Copy link
Contributor

fehguy commented Jun 16, 2016

fixed in efb7765

@fehguy fehguy closed this as completed Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants