Ignore:
Timestamp:
2013-05-07T13:54:57+02:00 (11 years ago)
Author:
stoecker
Message:

fix #8685 - wiki browser fix external links (althought they look very ugly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/WikiReader.java

    r5936 r5937  
    100100        boolean skip = false;
    101101        String b = "";
     102        String full = "";
    102103        for (String line = in.readLine(); line != null; line = in.readLine()) {
     104            full += line;
    103105            if (line.contains("<div id=\"searchable\">")) {
    104106                inside = true;
     
    121123                //
    122124                b += line.replaceAll("<img ", "<img border=\"0\" ")
     125                         .replaceAll("<span class=\"icon\">.</span>", "")
    123126                         .replaceAll("href=\"/", "href=\"" + baseurl + "/")
    124127                         .replaceAll(" />", ">")
     
    134137        || b.indexOf(" does not exist. You can create it here.</p>") >= 0)
    135138            return "";
     139        if(b.isEmpty())
     140            b = full;
    136141        return "<html><base href=\""+url.toExternalForm() +"\"> " + b + "</html>";
    137142    }
Note: See TracChangeset for help on using the changeset viewer.