PriyaranjanMohapatra / rest-client

Automatically exported from code.google.com/p/rest-client
Apache License 2.0
0 stars 0 forks source link

Can <test-script> use <![CDATA[]]> to enclose Java code for readability? #128

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Test Script tab, write Java code with "&&"
2. Click on File -> Save Request
3. "&&" gets encoded as "&amp;&amp;"

What is the expected output? What do you see instead?
1. Can we use <![CDATA[]]> to avoid special character encoding?
2. "&&" gets encoded as "&amp;&amp;"

What version of the product are you using? On what operating system?
Version 2.3.3 on Ubuntu 10.04 LTS VM

Please provide any additional information below.
This is just one possible solution, the goal is to avoid special character 
encoding. The benefit is readability.

Original issue reported on code.google.com by lee...@gmail.com on 8 Mar 2011 at 6:08

GoogleCodeExporter commented 8 years ago

Original comment by subwiz on 9 Mar 2011 at 3:33

GoogleCodeExporter commented 8 years ago
I verified thus: saved a request with '&&' and re-opened it in RESTClient. It 
works. Internally while serializing the request as XML, the XML parser (XOM in 
RESTClient case) converts to '&' to '&'. All XML parsers (if you are parsing 
the request file using custom code) will convert these characters without any 
user effort. 

Original comment by subwiz on 9 Mar 2011 at 3:42