mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
Caldav: encode LF to %0A in urlcompname
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1733 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
5e873cf756
commit
876deaf969
@ -133,6 +133,7 @@ public final class StringUtil {
|
||||
private static final Pattern GT_PATTERN = Pattern.compile(">");
|
||||
|
||||
private static final Pattern QUOTE_PATTERN = Pattern.compile("\"");
|
||||
private static final Pattern LF_PATTERN = Pattern.compile("\n");
|
||||
|
||||
private static final Pattern URLENCODED_AMP_PATTERN = Pattern.compile("%26");
|
||||
|
||||
@ -294,6 +295,9 @@ public final class StringUtil {
|
||||
if (result.indexOf('"') >= 0) {
|
||||
result = QUOTE_PATTERN.matcher(result).replaceAll("%22");
|
||||
}
|
||||
if (result.indexOf('\n') >= 0) {
|
||||
result = LF_PATTERN.matcher(result).replaceAll("%0A");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user