Skip to content

Commit

Permalink
[BasicUI] Fix character encoding of returned page (#2746)
Browse files Browse the repository at this point in the history
Fix #2681

Concerns only the settings page and the page listing all sitemaps

Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo authored Sep 17, 2024
1 parent 529893f commit 727b876
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
package org.openhab.ui.basic.internal.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.Servlet;
import javax.servlet.ServletException;
Expand Down Expand Up @@ -66,11 +65,8 @@ public ManifestServlet(final @Reference PageRenderer renderer) {

private void generateManifest(ServletResponse res, @Nullable String sitemapName)
throws IOException, RenderException {
PrintWriter resWriter;
resWriter = res.getWriter();
resWriter.append(renderer.renderManifest(sitemapName));

res.setContentType(MANIFEST_CONTENT_TYPE);
res.getWriter().append(renderer.renderManifest(sitemapName));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
package org.openhab.ui.basic.internal.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
Expand Down Expand Up @@ -118,19 +117,13 @@ protected void deactivate() {
}

private void showSitemapList(ServletResponse res) throws IOException, RenderException {
PrintWriter resWriter;
resWriter = res.getWriter();
resWriter.append(renderer.renderSitemapList(sitemapProviders));

res.setContentType(CONTENT_TYPE);
res.getWriter().append(renderer.renderSitemapList(sitemapProviders));
}

private void showSettings(ServletResponse res) throws IOException, RenderException {
PrintWriter resWriter;
resWriter = res.getWriter();
resWriter.append(renderer.renderSettings());

res.setContentType(CONTENT_TYPE);
res.getWriter().append(renderer.renderSettings());
}

@Override
Expand Down

0 comments on commit 727b876

Please sign in to comment.