diff --git a/core/src/main/java/hudson/widgets/HistoryWidget.java b/core/src/main/java/hudson/widgets/HistoryWidget.java index 5465000628b004dd3b6f6d7000e305288c73afd1..24882058b8b735bd08732416f21aaf1772cd7fb0 100644 --- a/core/src/main/java/hudson/widgets/HistoryWidget.java +++ b/core/src/main/java/hudson/widgets/HistoryWidget.java @@ -151,6 +151,8 @@ public class HistoryWidget extends Widget { public void doAjax( StaplerRequest req, StaplerResponse rsp, @Header("n") String n ) throws IOException, ServletException { + // FIXME n can be null if the client behave incorrectly. We should fail gracefully (404?) instead of NPEing + rsp.setContentType("text/html;charset=UTF-8"); // pick up builds to send back diff --git a/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly b/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly index 78ca3aacd56cd3cdd049612cc641381805bd7f2e..772c996d93171d39586052cb777966cc46bc7295 100644 --- a/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly +++ b/core/src/main/resources/hudson/widgets/HistoryWidget/index.jelly @@ -48,6 +48,13 @@ THE SOFTWARE.