Ignore:
Timestamp:
2014-01-11T20:25:43+01:00 (10 years ago)
Author:
simon04
Message:

fix #9560 - IllegalArgumentException when color.layer contains "{ }"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/Preferences.java

    r6670 r6671  
    5353import org.openstreetmap.josm.tools.CheckParameterUtil;
    5454import org.openstreetmap.josm.tools.ColorHelper;
     55import org.openstreetmap.josm.tools.I18n;
    5556import org.openstreetmap.josm.tools.Utils;
    5657
     
    836837            Matcher m = Pattern.compile("mappaint\\.(.+?)\\.(.+)").matcher(o);
    837838            if (m.matches()) {
    838                 return tr("Paint style {0}: {1}", tr(m.group(1)), tr(m.group(2)));
     839                return tr("Paint style {0}: {1}", tr(I18n.escape(m.group(1))), tr(I18n.escape(m.group(2))));
    839840            }
    840841        } catch (Exception e) {
     
    844845            Matcher m = Pattern.compile("layer (.+)").matcher(o);
    845846            if (m.matches()) {
    846                 return tr("Layer: {0}", tr(m.group(1)));
     847                return tr("Layer: {0}", tr(I18n.escape(m.group(1))));
    847848            }
    848849        } catch (Exception e) {
    849850            Main.warn(e);
    850851        }
    851         return tr(colornames.containsKey(o) ? colornames.get(o) : o);
     852        return tr(I18n.escape(colornames.containsKey(o) ? colornames.get(o) : o));
    852853    }
    853854
Note: See TracChangeset for help on using the changeset viewer.