sepe81 commented on code in PR #861:
URL: https://github.com/apache/struts/pull/861#discussion_r1464504379
##########
core/src/main/java/org/apache/struts2/dispatcher/multipart/AbstractMultiPartRequest.java:
##########
@@ -171,4 +171,8 @@ protected String getCanonicalName(final String
originalFileName) {
return fileName;
}
+ protected String sanitizeNewlines(String before) {
+ return before.replaceAll("[\n\r]", "_");
Review Comment:
```suggestion
return before.replaceAll("\R", "_");
```
maybe use this as more concise way to represent line breaks?
>Any Unicode linebreak sequence, is equivalent to
\u000D\u000A|[\u000A\u000B\u000C\u000D\u0085\u2028\u2029]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]