Skip to content

Commit 9c87d35

Browse files
committed
Fix not properly reanalyzing for Genre.HTML
1 parent 0ce96e7 commit 9c87d35

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

opengrok-web/src/main/webapp/list.jsp

+5-11
Original file line numberDiff line numberDiff line change
@@ -395,17 +395,11 @@ Click <a href="<%= rawPath %>">download <%= basename %></a><%
395395
<img src="<%= rawPath %>?<%= QueryParameters.REVISION_PARAM_EQ %><%= Util.URIEncode(rev) %>"/>
396396
<pre><%
397397
} else if (genre == Genre.HTML) {
398-
/**
399-
* For backward compatibility, read the
400-
* OpenGrok-produced document using the system
401-
* default charset.
402-
*/
403-
r = new InputStreamReader(in);
404-
/**
405-
* dumpXref() is also useful here for
406-
* translating links.
407-
*/
408-
Util.dumpXref(out, r, request.getContextPath());
398+
// sourceRoot is read with UTF-8 as a default.
399+
r = IOUtils.createBOMStrippedReader(in,
400+
StandardCharsets.UTF_8.name());
401+
AnalyzerGuru.writeDumpedXref(request.getContextPath(), fac, r, out,
402+
null, null, project);
409403
} else {
410404
%>Download file, <a href="<%= rawPath %>?<%= QueryParameters.REVISION_PARAM_EQ %>
411405
<%= Util.URIEncode(rev) %>"><%= basename %></a><%

0 commit comments

Comments
 (0)