antisamy
antisamy copied to clipboard
Antisamy Removes carriage returns and line feeds
https://github.com/andresriancho/owaspantisamy/issues/143
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.
@vadooss1 - Vadym - you ever going to be able to create a test case for this issue?
@davewichers sorry, but I will try to do it when I have more time. Thank you for the reminding.
@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 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:
- Carriage return (i.e.,
\n
) => ✅ - Line feed (i.e.,
\r\n
) => transformed into\n
, which is not a problem in my case so I won't investigate further.
Looks like a non-issue.