Index: /trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 5935)
+++ /trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java	(revision 5936)
@@ -47,8 +47,9 @@
         BufferedReader in = null;
         try {
-            con = Utils.openHttpConnection(new URL(helpTopicUrl));
+            URL u = new URL(helpTopicUrl);
+            con = Utils.openHttpConnection(u);
             con.connect();
             in = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));
-            return prepareHelpContent(in, dotest);
+            return prepareHelpContent(in, dotest, u);
         } catch(MalformedURLException e) {
             throw new HelpContentReaderException(e);
@@ -79,9 +80,10 @@
      * @throws HelpContentReaderException thrown if an exception occurs
      * @throws MissingHelpContentException thrown, if the content read isn't a help page
+     * @since 5935
      */
-    protected String prepareHelpContent(BufferedReader in, boolean dotest) throws HelpContentReaderException {
+    protected String prepareHelpContent(BufferedReader in, boolean dotest, URL url) throws HelpContentReaderException {
         String s = "";
         try {
-            s = readFromTrac(in);
+            s = readFromTrac(in, url);
         } catch(IOException e) {
             throw new HelpContentReaderException(e);
Index: /trunk/src/org/openstreetmap/josm/tools/WikiReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/WikiReader.java	(revision 5935)
+++ /trunk/src/org/openstreetmap/josm/tools/WikiReader.java	(revision 5936)
@@ -35,8 +35,9 @@
      */
     public String read(String url) throws IOException {
-        BufferedReader in = Utils.openURLReader(new URL(url));
+        URL u = new URL(url);
+        BufferedReader in = Utils.openURLReader(u);
         try {
             if (url.startsWith(baseurl) && !url.endsWith("?format=txt"))
-                return readFromTrac(in);
+                return readFromTrac(in, u);
             return readNormal(in);
         } finally {
@@ -78,5 +79,5 @@
         BufferedReader in = Utils.openURLReader(url);
         try {
-            return readFromTrac(in);
+            return readFromTrac(in, url);
         } finally {
             Utils.close(in);
@@ -94,5 +95,5 @@
     }
 
-    protected String readFromTrac(BufferedReader in) throws IOException {
+    protected String readFromTrac(BufferedReader in, URL url) throws IOException {
         boolean inside = false;
         boolean transl = false;
@@ -119,5 +120,8 @@
                 // will render a thick  border around images inside an <a> element
                 //
-                b += line.replaceAll("<img ", "<img border=\"0\" ").replaceAll(" />", ">") + "\n";
+                b += line.replaceAll("<img ", "<img border=\"0\" ")
+                         .replaceAll("href=\"/", "href=\"" + baseurl + "/")
+                         .replaceAll(" />", ">")
+                         + "\n";
             } else if (transl && line.contains("</div>")) {
                 transl = false;
@@ -130,5 +134,5 @@
         || b.indexOf(" does not exist. You can create it here.</p>") >= 0)
             return "";
-        return "<html><base href=\""+baseurl+"\"> " + b + "</html>";
+        return "<html><base href=\""+url.toExternalForm() +"\"> " + b + "</html>";
     }
 }
