[GH-ISSUE #4213] [bug]: XML special symbol escape #1524

Open
opened 2026-03-16 20:41:43 +03:00 by kerem · 2 comments
Owner

Originally created by @Carlos920 on GitHub (Jul 26, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4213

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I call an interface, the result set contains the & symbol instead of &amp At this point, hoppscotch will directly display &, while when the result set is &amp When displayed, it still shows &amp
I think this is a mistake that sometimes misleads developers. If the result set contains the & symbol instead of the escape symbol, an error should be reported and developers should be alerted to the presence of the incorrect symbol (as directly prompted in Chrome)
image

Steps to reproduce

  1. Manually concatenate an XML without using an XML parser
  2. Generate an XML using an XML parser

All contain XML special symbols such as&

Environment

Production

Version

Cloud

Originally created by @Carlos920 on GitHub (Jul 26, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4213 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When I call an interface, the result set contains the `&` symbol instead of `&amp` At this point, hoppscotch will directly display `&`, while when the result set is `&amp` When displayed, it still shows `&amp` I think this is a mistake that sometimes misleads developers. If the result set contains the `&` symbol instead of the escape symbol, an error should be reported and developers should be alerted to the presence of the incorrect symbol (as directly prompted in Chrome) ![image](https://github.com/user-attachments/assets/85de10a0-09d6-48cd-ae35-76e70232932e) ### Steps to reproduce 1. Manually concatenate an XML without using an XML parser 2. Generate an XML using an XML parser All contain XML special symbols such as`&` ### Environment Production ### Version Cloud
Author
Owner

@Git-Harshit commented on GitHub (Oct 11, 2024):

@Carlos920, Can you please share some sample interface value that you may have used along with any pw.test() that you had to setup in order to get this result in Test Results tab in https://hoppscotch.io/?
I was trying to reproduce this issue, but I am unable to do so without the proper inputs.

Also, for Ampersand (&) symbol, the HTML Character Entity is &, this and any such entity starts with '&' and ends in a ';' semi-colon. Perhaps you had just used '&amp' without a trailing semi-colon (;) from your XML editor and so you had encountered that issue.
Have a check and a confirmation on some sample case for reproduction of this issue may help in picking it up for a fix.

<!-- gh-comment-id:2407430942 --> @Git-Harshit commented on GitHub (Oct 11, 2024): @Carlos920, Can you please share some sample interface value that you may have used along with any pw.test() that you had to setup in order to get this result in Test Results tab in https://hoppscotch.io/? I was trying to reproduce this issue, but I am unable to do so without the proper inputs. Also, for Ampersand (&) symbol, the HTML Character Entity is `&amp;`, this and any such entity starts with '&' and ends in a ';' semi-colon. Perhaps you had just used '_&amp_' without a trailing semi-colon (;) from your XML editor and so you had encountered that issue. Have a check and a confirmation on some sample case for reproduction of this issue may help in picking it up for a fix.
Author
Owner

@Carlos920 commented on GitHub (Oct 12, 2024):

@Carlos920, Can you please share some sample interface value that you may have used along with any pw.test() that you had to setup in order to get this result in Test Results tab in https://hoppscotch.io/? I was trying to reproduce this issue, but I am unable to do so without the proper inputs.

Also, for Ampersand (&) symbol, the HTML Character Entity is &amp;, this and any such entity starts with '&' and ends in a ';' semi-colon. Perhaps you had just used '&amp' without a trailing semi-colon (;) from your XML editor and so you had encountered that issue. Have a check and a confirmation on some sample case for reproduction of this issue may help in picking it up for a fix.

image
image

test.xml

<response>
  <error>
  </error>
  <data>
    <info>
      <a>123&456</a>
      <b>123&amp;456</b>
    </info>
  </data>
</response>
<!-- gh-comment-id:2408281749 --> @Carlos920 commented on GitHub (Oct 12, 2024): > @Carlos920, Can you please share some sample interface value that you may have used along with any pw.test() that you had to setup in order to get this result in Test Results tab in https://hoppscotch.io/? I was trying to reproduce this issue, but I am unable to do so without the proper inputs. > > Also, for Ampersand (&) symbol, the HTML Character Entity is `&amp;`, this and any such entity starts with '&' and ends in a ';' semi-colon. Perhaps you had just used '_&amp_' without a trailing semi-colon (;) from your XML editor and so you had encountered that issue. Have a check and a confirmation on some sample case for reproduction of this issue may help in picking it up for a fix. ![image](https://github.com/user-attachments/assets/67bd17ef-c654-4928-bc64-5d622d7e9fa8) ![image](https://github.com/user-attachments/assets/bbf073ad-afc8-4265-bf46-5977da385040) #### test.xml ```xml <response> <error> </error> <data> <info> <a>123&456</a> <b>123&amp;456</b> </info> </data> </response> ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1524
No description provided.