Changeset 15113 in josm


Ignore:
Timestamp:
2019-05-25T20:17:02+02:00 (5 months ago)
Author:
GerdP
Message:

fix #17746: Detect invalid MapCSS search expressions

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/search/SearchCompiler.java

    r14654 r15113  
    19961996    static Match compileMapCSS(String mapCSS) throws SearchParseError {
    19971997        try {
    1998             final List<Selector> selectors = new MapCSSParser(new StringReader(mapCSS)).selectors();
     1998            final List<Selector> selectors = new MapCSSParser(new StringReader(mapCSS)).selectors_for_search();
    19991999            return new Match() {
    20002000                @Override
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj

    r15102 r15113  
    655655        }
    656656    }
     657}
     658
     659/** Read selectors, make sure that we read all tokens  See #17746 */
     660List<Selector> selectors_for_search():
     661{
     662    List<Selector> selectors;
     663}
     664{
     665    selectors=selectors() <EOF>
     666    { return selectors; }
    657667}
    658668
Note: See TracChangeset for help on using the changeset viewer.