mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 03:02:22 -05:00
EWS: Allow null value in StringUtil.decodeUrlcompname
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1775 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
ed14e65e82
commit
4fb681d009
@ -225,10 +225,10 @@ public final class StringUtil {
|
|||||||
if (result.indexOf('"') >= 0) {
|
if (result.indexOf('"') >= 0) {
|
||||||
result = QUOTE_PATTERN.matcher(result).replaceAll(""");
|
result = QUOTE_PATTERN.matcher(result).replaceAll(""");
|
||||||
}
|
}
|
||||||
if (result.indexOf('\r') >=0) {
|
if (result.indexOf('\r') >= 0) {
|
||||||
result = CR_PATTERN.matcher(result).replaceAll("
");
|
result = CR_PATTERN.matcher(result).replaceAll("
");
|
||||||
}
|
}
|
||||||
if (result.indexOf('\n') >=0) {
|
if (result.indexOf('\n') >= 0) {
|
||||||
result = LF_PATTERN.matcher(result).replaceAll("
");
|
result = LF_PATTERN.matcher(result).replaceAll("
");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -330,6 +330,7 @@ public final class StringUtil {
|
|||||||
*/
|
*/
|
||||||
public static String decodeUrlcompname(String urlcompname) {
|
public static String decodeUrlcompname(String urlcompname) {
|
||||||
String result = urlcompname;
|
String result = urlcompname;
|
||||||
|
if (result != null) {
|
||||||
if (result.indexOf((char) 0xF8FF) >= 0) {
|
if (result.indexOf((char) 0xF8FF) >= 0) {
|
||||||
result = URLENCODED_F8FF_PATTERN.matcher(result).replaceAll("_xF8FF_");
|
result = URLENCODED_F8FF_PATTERN.matcher(result).replaceAll("_xF8FF_");
|
||||||
}
|
}
|
||||||
@ -358,6 +359,7 @@ public final class StringUtil {
|
|||||||
if (result.indexOf("%25") >= 0) {
|
if (result.indexOf("%25") >= 0) {
|
||||||
result = URLENCODED_PERCENT_PATTERN.matcher(result).replaceAll("%");
|
result = URLENCODED_PERCENT_PATTERN.matcher(result).replaceAll("%");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user