mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
fix crash on some mailto: links
if the value part is missing, it otherwise crashes when calling MailtoUtil.getText() and the exception is not handled there (it is not in at least one case). therefore, just catch the exception in this cornercase (same for bad encoding) and return an empty string.
This commit is contained in:
parent
af20e73e80
commit
79aa5ad587
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ public class MailtoUtil {
|
||||||
String[] queryEntryArray = queryEntry.split(KEY_VALUE_SEPARATOR);
|
String[] queryEntryArray = queryEntry.split(KEY_VALUE_SEPARATOR);
|
||||||
try {
|
try {
|
||||||
mailtoQueryMap.put(queryEntryArray[0], URLDecoder.decode(queryEntryArray[1], "UTF-8"));
|
mailtoQueryMap.put(queryEntryArray[0], URLDecoder.decode(queryEntryArray[1], "UTF-8"));
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue