antisamy icon indicating copy to clipboard operation
antisamy copied to clipboard

Antisamy Removes carriage returns and line feeds

Open vadooss1 opened this issue 4 years ago • 4 comments

https://github.com/andresriancho/owaspantisamy/issues/143

vadooss1 avatar May 07 '20 15:05 vadooss1

Arshan is specifically asking you to create a test case in this file: https://github.com/nahsra/antisamy/blob/master/src/test/java/org/owasp/validator/html/test/AntiSamyTest.java. Create test case # 41 with all the proper settings to repeat the problem you are reporting so we know exactly the configuration that is causing this misbehavior and test results that detect and flag this.

And then issue a pull request for it.

Once this is done, we can investigate whether we can fix this relatively easily or not, and if we can, we will.

davewichers avatar May 14 '20 13:05 davewichers

@vadooss1 - Vadym - you ever going to be able to create a test case for this issue?

davewichers avatar Nov 04 '20 17:11 davewichers

@davewichers sorry, but I will try to do it when I have more time. Thank you for the reminding.

vadooss1 avatar Nov 06 '20 08:11 vadooss1

@davewichers sorry, but I will try to do it when I have more time. Thank you for the reminding.

@vadooss1 - Still waiting for that test case, and its been more than 1 year ...

davewichers avatar Jan 08 '22 16:01 davewichers

@davewichers Just a quick FYI, using:

Policy
  .getInstance(getClass.getResourceAsStream(path))
  .cloneWithDirective(Policy.PRESERVE_SPACE, "true")
  .cloneWithDirective(Policy.FORMAT_OUTPUT, "false")

I got the following results:

  1. Carriage return (i.e., \n) => ✅
  2. Line feed (i.e., \r\n) => transformed into \n, which is not a problem in my case so I won't investigate further.

gulien avatar May 24 '23 14:05 gulien

Looks like a non-issue.

davewichers avatar May 25 '23 00:05 davewichers