mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-14 07:08:00 -05:00
Fixed issue 497
This commit is contained in:
parent
3707e0e666
commit
b572c8e065
@ -28,6 +28,12 @@ public class Address {
|
|||||||
|
|
||||||
public Address(String address, String personal) {
|
public Address(String address, String personal) {
|
||||||
this.mAddress = address;
|
this.mAddress = address;
|
||||||
|
if ("".equals(personal)) {
|
||||||
|
personal = null;
|
||||||
|
}
|
||||||
|
if (personal!=null) {
|
||||||
|
personal = personal.trim();
|
||||||
|
}
|
||||||
this.mPersonal = personal;
|
this.mPersonal = personal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,6 +54,12 @@ public class Address {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPersonal(String personal) {
|
public void setPersonal(String personal) {
|
||||||
|
if ("".equals(personal)) {
|
||||||
|
personal = null;
|
||||||
|
}
|
||||||
|
if (personal!=null) {
|
||||||
|
personal = personal.trim();
|
||||||
|
}
|
||||||
this.mPersonal = personal;
|
this.mPersonal = personal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,7 +140,7 @@ public class Address {
|
|||||||
public String toString() {
|
public String toString() {
|
||||||
if (mPersonal != null) {
|
if (mPersonal != null) {
|
||||||
// if (mPersonal.matches(".*[\\(\\)<>@,;:\\\\\".\\[\\]].*")) {
|
// if (mPersonal.matches(".*[\\(\\)<>@,;:\\\\\".\\[\\]].*")) {
|
||||||
return "\"" + mPersonal+ "\" " + " <" + mAddress + ">";
|
return Utility.quoteString(mPersonal) + " <" + mAddress + ">";
|
||||||
// } else {
|
// } else {
|
||||||
// return mPersonal + " <" + mAddress + ">";
|
// return mPersonal + " <" + mAddress + ">";
|
||||||
// }
|
// }
|
||||||
|
Loading…
Reference in New Issue
Block a user