From 358d2f6b501f454e47c1bf99090ddca3126d4d26 Mon Sep 17 00:00:00 2001 From: Chris Fraire Date: Fri, 22 May 2020 22:12:50 -0500 Subject: [PATCH] Fix not properly reanalyzing for Genre.HTML --- opengrok-web/src/main/webapp/list.jsp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/opengrok-web/src/main/webapp/list.jsp b/opengrok-web/src/main/webapp/list.jsp index 85b03871c87..f194a3f00a8 100644 --- a/opengrok-web/src/main/webapp/list.jsp +++ b/opengrok-web/src/main/webapp/list.jsp @@ -395,17 +395,11 @@ Click download <%= basename %><%
<%
                             } else if (genre == Genre.HTML) {
-                                /**
-                                 * For backward compatibility, read the
-                                 * OpenGrok-produced document using the system
-                                 * default charset.
-                                 */
-                                r = new InputStreamReader(in);
-                                /**
-                                 * dumpXref() is also useful here for
-                                 * translating links.
-                                 */
-                                Util.dumpXref(out, r, request.getContextPath());
+                                // sourceRoot is read with UTF-8 as a default.
+                                r = IOUtils.createBOMStrippedReader(in,
+                                        StandardCharsets.UTF_8.name());
+                                AnalyzerGuru.writeDumpedXref(request.getContextPath(), fac, r, out,
+                                        null, null, project);
                             } else {
         %>Download file, <%= basename %><%