Index: src/org/openstreetmap/josm/gui/widgets/JosmHTMLEditorKit.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/org/openstreetmap/josm/gui/widgets/JosmHTMLEditorKit.java b/src/org/openstreetmap/josm/gui/widgets/JosmHTMLEditorKit.java
--- a/src/org/openstreetmap/josm/gui/widgets/JosmHTMLEditorKit.java	(revision 18582)
+++ b/src/org/openstreetmap/josm/gui/widgets/JosmHTMLEditorKit.java	(date 1666900582088)
@@ -1,10 +1,15 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.widgets;
 
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
 import javax.swing.text.ViewFactory;
+import javax.swing.text.html.HTMLDocument;
 import javax.swing.text.html.HTMLEditorKit;
 import javax.swing.text.html.StyleSheet;
 
+import org.openstreetmap.josm.tools.TextUtils;
+
 /**
  * A subclass of {@link HTMLEditorKit} that fixes an uncommon design choice that shares the set stylesheet between all instances.
  * This class stores a single stylesheet per instance, as it should have be done by Sun in the first place.
@@ -51,4 +56,30 @@
     public ViewFactory getViewFactory() {
         return FACTORY;
     }
+
+    @Override
+    public Document createDefaultDocument() {
+        StyleSheet styles = getStyleSheet();
+        StyleSheet ss = new StyleSheet();
+
+        ss.addStyleSheet(styles);
+
+        HTMLDocument doc = new UrlHTMLDocument(ss);
+        doc.setParser(getParser());
+        doc.setAsynchronousLoadPriority(4);
+        doc.setTokenThreshold(100);
+        return doc;
+    }
+
+    private static class UrlHTMLDocument extends HTMLDocument {
+        UrlHTMLDocument(StyleSheet ss) {
+            super(ss);
+        }
+
+        @Override
+        public String getText(int offset, int length) throws BadLocationException {
+            String original = super.getText(offset, length);
+            return TextUtils.unwrapLongUrl(original);
+        }
+    }
 }
Index: src/org/openstreetmap/josm/tools/TextUtils.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/org/openstreetmap/josm/tools/TextUtils.java b/src/org/openstreetmap/josm/tools/TextUtils.java
--- a/src/org/openstreetmap/josm/tools/TextUtils.java	(revision 18582)
+++ b/src/org/openstreetmap/josm/tools/TextUtils.java	(date 1666896571576)
@@ -20,4 +20,14 @@
     public static String wrapLongUrl(String url) {
         return url.replace("/", "/\u200b").replace("&", "&\u200b");
     }
+
+    /**
+     * Remove zero width space character (U+8203) after each slash/ampersand to wrap long URLs.
+     * @param url URL
+     * @return unwrapped URL
+     * @since xxx
+     */
+    public static String unwrapLongUrl(String url) {
+        return url.replace("/\u200b", "/").replace("&\u200b", "&");
+    }
 }
