From 81e49c9ddc6ce1fa7995b8cc998b78c03db695d8 Mon Sep 17 00:00:00 2001 From: Tobias Pfeiffer Date: Sat, 22 Feb 2020 22:38:05 +0100 Subject: [PATCH] Revert "Fix UTF8 encoding error" This reverts commit 2608b9db2f2012c1223e88b0275e48ef10818553. Replaced by: https://github.com/colszowka/simplecov/pull/866 As suggested by: https://github.com/colszowka/simplecov-html/issues/91#issuecomment-586101265 Should be safe to revert as apparently ruby itself doesn't work when the encoding isn't declared properly so should be good. For files that aren't required by ruby but tracked we added a test case with broken encoding (in simplecov main) but it still seems to work. So this complexity is likely not needed anymore. --- views/source_file.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/source_file.erb b/views/source_file.erb index e9bc5a6..92d7958 100644 --- a/views/source_file.erb +++ b/views/source_file.erb @@ -45,7 +45,7 @@ <% end %> <% end %> - <%= CGI.escapeHTML(line.src.chomp.encode('UTF-8', invalid: :replace, undef: :replace)) %> + <%= CGI.escapeHTML(line.src.chomp) %> <% end %>