Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f03666bead |
@@ -6,6 +6,8 @@ public class Sanitizer {
|
|||||||
if (sanitizeNewlines) {
|
if (sanitizeNewlines) {
|
||||||
sanitized = sanitized.replaceAll("\n", "\\\\n");
|
sanitized = sanitized.replaceAll("\n", "\\\\n");
|
||||||
if (!s.endsWith("\n")) sanitized += '\n';
|
if (!s.endsWith("\n")) sanitized += '\n';
|
||||||
|
} else {
|
||||||
|
sanitized = sanitized.replaceAll("\n\n+", "\n");
|
||||||
}
|
}
|
||||||
return sanitized;
|
return sanitized;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user