Formatting text input from html textarea in scrape

We have a scrape file that posts a form with multiple inputs.
We are having a problem posting the session variable for the textarea input when applying newline.

When recording the form submission through the SS proxy the parameter value is:

comments=Comments+Line+1%0D%0AComments+Line+2%0D%0AComments+Line+3%0D%0AComments+Line+4

This works exactly as required and expected.

However, when we pass this value as a session variable we cannot replicate this.
If we duplicate the above the + is encoded and %0D%0A show in the textarea.

When we pass the string with spaces and %0D%0A, the spaces are OK but %0D%0A is part of the text.

If we use '\r' or '\n' or '\r\n' the string cuts off at 'Comments Line 1'

Any help with this would be greatly appreciated.

Anytime that you are using

Anytime that you are using the parameters tab, it will try to encode the values for you.

If they are GET parameters, the easy thing to do would be to empty the parameters tab, and just add the parameters to the URL on the general tab.

If they are POST, and you cannot do that, you would want to make sure the value you set isn't already encoded. You would do something like

import java.net.URLDecoder;

comments = "Comments+Line+1%0D%0AComments+Line+2%0D%0AComments+Line+3%0D%0AComments+Line+4";
comments = URLdecoder.decode(comments);
session.setv("COMMENTS", comments);

That's the one!

Thanks Jason.

That solved the problem.