From e3c3c86a2471043550054c8790ff6c24c808e352 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Jan 2010 21:52:27 +0100 Subject: [PATCH] Allow more content types than HTML for the index file. --- src/de/todesbaum/jsite/main/Main.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index 9f21042..f59e29c 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -24,8 +24,10 @@ import java.awt.event.ActionListener; import java.io.File; import java.io.IOException; import java.text.MessageFormat; +import java.util.Arrays; import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; @@ -530,7 +532,8 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen return; } } - if (hasIndexFile && !project.getFileOption(indexFile).getMimeType().equals("text/html")) { + List allowedIndexContentTypes = Arrays.asList("text/html", "application/xhtml+xml"); + if (hasIndexFile && !allowedIndexContentTypes.contains(project.getFileOption(indexFile).getMimeType())) { if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.project-files.index-not-html"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.OK_OPTION) { return; } -- 2.7.4