Index: /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java	(revision 8347)
@@ -379,5 +379,5 @@
                     InputSource inputSource = new InputSource(reader);
                     NameFinderResultParser parser = new NameFinderResultParser();
-                    Utils.newSafeSAXParser().parse(inputSource, parser);
+                    Utils.parseSafeSAX(inputSource, parser);
                     this.data = parser.getResult();
                 }
Index: /trunk/src/org/openstreetmap/josm/io/Capabilities.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/Capabilities.java	(revision 8347)
@@ -272,5 +272,5 @@
         public static Capabilities parse(InputSource inputSource) throws SAXException, IOException, ParserConfigurationException {
             CapabilitiesParser parser = new CapabilitiesParser();
-            Utils.newSafeSAXParser().parse(inputSource, parser);
+            Utils.parseSafeSAX(inputSource, parser);
             return parser.getCapabilities();
         }
Index: /trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/DiffResultProcessor.java	(revision 8347)
@@ -84,5 +84,5 @@
             progressMonitor.beginTask(tr("Parsing response from server..."));
             InputSource inputSource = new InputSource(new StringReader(diffUploadResponse));
-            Utils.newSafeSAXParser().parse(inputSource, new Parser());
+            Utils.parseSafeSAX(inputSource, new Parser());
         } catch(XmlParsingException e) {
             throw e;
Index: /trunk/src/org/openstreetmap/josm/io/GpxReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/GpxReader.java	(revision 8347)
@@ -542,5 +542,5 @@
         Parser parser = new Parser();
         try {
-            Utils.newSafeSAXParser().parse(inputSource, parser);
+            Utils.parseSafeSAX(inputSource, parser);
             return true;
         } catch (SAXException e) {
Index: /trunk/src/org/openstreetmap/josm/io/NoteReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/NoteReader.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/NoteReader.java	(revision 8347)
@@ -222,5 +222,5 @@
         DefaultHandler parser = new Parser();
         try {
-            Utils.newSafeSAXParser().parse(inputSource, parser);
+            Utils.parseSafeSAX(inputSource, parser);
         } catch (ParserConfigurationException e) {
             Main.error(e); // broken SAXException chaining
Index: /trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/OsmChangesetContentParser.java	(revision 8347)
@@ -151,5 +151,5 @@
             progressMonitor.beginTask("");
             progressMonitor.indeterminateSubTask(tr("Parsing changeset content ..."));
-            Utils.newSafeSAXParser().parse(source, new Parser());
+            Utils.parseSafeSAX(source, new Parser());
         } catch(XmlParsingException e) {
             throw e;
Index: /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 8347)
@@ -278,5 +278,5 @@
             progressMonitor.indeterminateSubTask(tr("Parsing list of changesets..."));
             InputSource inputSource = new InputSource(new InvalidXmlCharacterFilter(new InputStreamReader(source, StandardCharsets.UTF_8)));
-            Utils.newSafeSAXParser().parse(inputSource, parser.new Parser());
+            Utils.parseSafeSAX(inputSource, parser.new Parser());
             return parser.getChangesets();
         } catch(ParserConfigurationException | SAXException e) {
Index: /trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/OsmHistoryReader.java	(revision 8347)
@@ -91,5 +91,5 @@
         progressMonitor.beginTask(tr("Parsing OSM history data ..."));
         try {
-            Utils.newSafeSAXParser().parse(inputSource, new Parser());
+            Utils.parseSafeSAX(inputSource, new Parser());
         } catch (ParserConfigurationException e) {
             Main.error(e); // broken SAXException chaining
Index: /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java	(revision 8347)
@@ -57,5 +57,5 @@
                     .getInputStream()) {
                 InputSource is = new InputSource(UTFInputStreamReader.create(in));
-                Utils.newSafeSAXParser().parse(is, parser);
+                Utils.parseSafeSAX(is, parser);
                 return parser.entries;
             }
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8346)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 8347)
@@ -59,5 +59,7 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Version;
+import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
@@ -1227,3 +1229,25 @@
         return parserFactory.newSAXParser();
     }
+
+    /**
+     * Parse the content given {@link org.xml.sax.InputSource} as XML using the specified {@link org.xml.sax.helpers.DefaultHandler}.
+     * This method uses a secure SAX parser, supporting XML namespaces.
+     *
+     * @param is The InputSource containing the content to be parsed.
+     * @param dh The SAX DefaultHandler to use.
+     * @throws ParserConfigurationException if a parser cannot be created which satisfies the requested configuration.
+     * @throws SAXException for SAX errors.
+     * @throws IOException if any IO errors occur.
+     * @since 8347
+     */
+    public static void parseSafeSAX(InputSource is, DefaultHandler dh) throws ParserConfigurationException, SAXException, IOException {
+        long start = System.currentTimeMillis();
+        if (Main.isDebugEnabled()) {
+            Main.debug("Starting SAX parsing of "+is+" using "+dh);
+        }
+        newSafeSAXParser().parse(is, dh);
+        if (Main.isDebugEnabled()) {
+            Main.debug("SAX parsing done in " + getDurationString(System.currentTimeMillis()-start));
+        }
+    }
 }
