Index: /applications/editors/josm/plugins/reltoolbox/build.xml
===================================================================
--- /applications/editors/josm/plugins/reltoolbox/build.xml	(revision 34085)
+++ /applications/editors/josm/plugins/reltoolbox/build.xml	(revision 34086)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="RelToolbox: make natural sort for relation and find relation lists"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="12840"/>
+    <property name="plugin.main.version" value="13522"/>
 
     <property name="plugin.author" value="Ilya Zverev"/>
Index: /applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java
===================================================================
--- /applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java	(revision 34085)
+++ /applications/editors/josm/plugins/reltoolbox/src/relcontext/actions/RelationHelpAction.java	(revision 34086)
@@ -5,8 +5,5 @@
 
 import java.awt.event.ActionEvent;
-import java.net.HttpURLConnection;
 import java.net.URI;
-import java.net.URLEncoder;
-import java.util.ArrayList;
 import java.util.List;
 
@@ -16,7 +13,8 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.dialogs.properties.HelpAction;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.LanguageInfo;
-import org.openstreetmap.josm.tools.OpenBrowser;
+import org.openstreetmap.josm.tools.Logging;
 
 import relcontext.ChosenRelation;
@@ -24,8 +22,7 @@
 
 public class RelationHelpAction extends AbstractAction implements ChosenRelationListener {
-    private ChosenRelation rel;
+    private final ChosenRelation rel;
 
     public RelationHelpAction(ChosenRelation rel) {
-        super();
         putValue(NAME, tr("Open relation wiki page"));
         putValue(SHORT_DESCRIPTION, tr("Launch browser with wiki help for selected object"));
@@ -41,7 +38,4 @@
     }
 
-    /**
-     * Copypasted from {@link org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.HelpAction}.
-     */
     @Override
     public void actionPerformed(ActionEvent e) {
@@ -51,58 +45,8 @@
             String base = Main.pref.get("url.openstreetmap-wiki", "http://wiki.openstreetmap.org/wiki/");
             String lang = LanguageInfo.getWikiLanguagePrefix();
-            final List<URI> uris = new ArrayList<>();
-            String type = URLEncoder.encode(rel.get().get("type"), "UTF-8");
-
-            if (type != null && !type.equals("")) {
-                uris.add(new URI(String.format("%s%sRelation:%s", base, lang, type)));
-                uris.add(new URI(String.format("%sRelation:%s", base, type)));
-            }
-
-            uris.add(new URI(String.format("%s%sRelations", base, lang)));
-            uris.add(new URI(String.format("%sRelations", base)));
-
-            MainApplication.worker.execute(() -> {
-                try {
-                    // find a page that actually exists in the wiki
-                    HttpURLConnection conn;
-                    for (URI u : uris) {
-                        conn = (HttpURLConnection) u.toURL().openConnection();
-                        conn.setConnectTimeout(5000);
-
-                        if (conn.getResponseCode() != 200) {
-                            System.out.println("INFO: " + u + " does not exist");
-                            conn.disconnect();
-                        } else {
-                            int osize = conn.getContentLength();
-                            conn.disconnect();
-
-                            conn = (HttpURLConnection) new URI(u.toString()
-                                    .replace("=", "%3D") /* do not URLencode whole string! */
-                                    .replaceFirst("/wiki/", "/w/index.php?redirect=no&title=")
-                                    ).toURL().openConnection();
-                            conn.setConnectTimeout(5000);
-
-                            /* redirect pages have different content length, but retrieving a "nonredirect"
-                             *  page using index.php and the direct-link method gives slightly different
-                             *  content lengths, so we have to be fuzzy.. (this is UGLY, recode if u know better)
-                             */
-                            if (Math.abs(conn.getContentLength() - osize) > 200) {
-                                System.out.println("INFO: " + u + " is a mediawiki redirect");
-                                conn.disconnect();
-                            } else {
-                                System.out.println("INFO: browsing to " + u);
-                                conn.disconnect();
-
-                                OpenBrowser.displayUrl(u.toString());
-                                break;
-                            }
-                        }
-                    }
-                } catch (Exception e1) {
-                    e1.printStackTrace();
-                }
-            });
+            final List<URI> uris = HelpAction.getRelationURIs(base, lang, rel.get());
+            MainApplication.worker.execute(() -> HelpAction.displayHelp(uris));
         } catch (Exception e1) {
-            e1.printStackTrace();
+            Logging.error(e1);
         }
     }
