Changeset 3369


Ignore:
Timestamp:
08/13/03 18:25:17 (18 years ago)
Author:
piso
Message:

toString(), toEncodedString(): enclose string in quotes if it contains a '.'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/mail/MailAddress.java

    r1738 r3369  
    33 *
    44 * Copyright (C) 2000-2003 Peter Graves
    5  * $Id: MailAddress.java,v 1.3 2003-05-07 18:51:24 piso Exp $
     5 * $Id: MailAddress.java,v 1.4 2003-08-13 18:25:17 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    9696        FastStringBuffer sb = new FastStringBuffer();
    9797        if (personal != null && personal.length() > 0) {
    98             if (personal.indexOf(',') >= 0) {
     98            if (personal.indexOf(',') >= 0 || personal.indexOf('.') >= 0) {
    9999                sb.append('"');
    100100                sb.append(personal);
     
    117117            return toString();
    118118        FastStringBuffer sb = new FastStringBuffer();
    119         if (encodedPersonal.indexOf(',') >= 0) {
     119        if (encodedPersonal.indexOf(',') >= 0 || encodedPersonal.indexOf('.') >= 0) {
    120120            sb.append('"');
    121121            sb.append(encodedPersonal);
Note: See TracChangeset for help on using the changeset viewer.