summaryrefslogtreecommitdiff
path: root/coverage/html.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/html.py')
-rw-r--r--coverage/html.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/coverage/html.py b/coverage/html.py
index 7e1e544a..5d2c561c 100644
--- a/coverage/html.py
+++ b/coverage/html.py
@@ -140,6 +140,8 @@ class HtmlReporter(Reporter):
def escape(t):
"""HTML-escape the text in t."""
return (t
+ # Change all tabs to 4 spaces.
+ .expandtabs(4)
# Convert HTML special chars into HTML entities.
.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
.replace("'", "&#39;").replace('"', "&quot;")