Skip to content

Commit 676c738

Browse files
committed
Remove Windows newlines since those can mess up Markdown conversion when still present in Markdown tables
1 parent d05486d commit 676c738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/com/compassion/commons/site/SiteUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ public static String sanitizeEntities(String s) {
4848
* @return the string with any newlines replaced with an HTML line break tag
4949
*/
5050
public static String preserveNewlines(String s) {
51-
return StringUtils.replace(s, "\n", "<br/>");
51+
return StringUtils.remove(StringUtils.replace(s, "\n", "<br/>"), '\r');
5252
}
5353
}

0 commit comments

Comments
 (0)