From: David ‘Bombe’ Roden Date: Wed, 13 Jan 2010 20:52:27 +0000 (+0100) Subject: Allow more content types than HTML for the index file. X-Git-Tag: 0.9~36 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e3c3c86a2471043550054c8790ff6c24c808e352;p=jSite.git Allow more content types than HTML for the index file. --- 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; }