mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 09:21:49 -05:00
Carddav: encode star in urlcompname
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1846 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
28a1c36b09
commit
bea410e228
@ -133,6 +133,7 @@ public final class StringUtil {
|
||||
private static final Pattern GT_PATTERN = Pattern.compile(">");
|
||||
private static final Pattern PERCENT_PATTERN = Pattern.compile("%");
|
||||
private static final Pattern HASH_PATTERN = Pattern.compile("#");
|
||||
private static final Pattern STAR_PATTERN = Pattern.compile("\\*");
|
||||
|
||||
private static final Pattern QUOTE_PATTERN = Pattern.compile("\"");
|
||||
private static final Pattern CR_PATTERN = Pattern.compile("\r");
|
||||
@ -148,6 +149,7 @@ public final class StringUtil {
|
||||
private static final Pattern URLENCODED_X0D0A_PATTERN = Pattern.compile("\n");
|
||||
private static final Pattern URLENCODED_PERCENT_PATTERN = Pattern.compile("%25");
|
||||
private static final Pattern URLENCODED_HASH_PATTERN = Pattern.compile("%23");
|
||||
private static final Pattern URLENCODED_STAR_PATTERN = Pattern.compile("%2A");
|
||||
|
||||
private static final Pattern ENCODED_AMP_PATTERN = Pattern.compile("&");
|
||||
private static final Pattern ENCODED_LT_PATTERN = Pattern.compile("<");
|
||||
@ -321,6 +323,9 @@ public final class StringUtil {
|
||||
if (result.indexOf('#') >= 0) {
|
||||
result = HASH_PATTERN.matcher(result).replaceAll("%23");
|
||||
}
|
||||
if (result.indexOf('*') >= 0) {
|
||||
result = STAR_PATTERN.matcher(result).replaceAll("%2A");
|
||||
}
|
||||
if (result.indexOf("_x000D__x000A_") >= 0) {
|
||||
result = X0D0A_PATTERN.matcher(result).replaceAll("\r\n");
|
||||
}
|
||||
@ -364,6 +369,9 @@ public final class StringUtil {
|
||||
if (result.indexOf("%23") >= 0) {
|
||||
result = URLENCODED_HASH_PATTERN.matcher(result).replaceAll("#");
|
||||
}
|
||||
if (result.indexOf("%2A") >= 0) {
|
||||
result = URLENCODED_STAR_PATTERN.matcher(result).replaceAll("*");
|
||||
}
|
||||
if (result.indexOf("%25") >= 0) {
|
||||
result = URLENCODED_PERCENT_PATTERN.matcher(result).replaceAll("%");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user