Module: check_mk
Branch: master
Commit: 6f50a7429819737ee9e2595c2273b107c098dd6b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6f50a742981973…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 17 16:16:48 2016 +0200
Quick fix for garbled HTML/JS code after recent refactoring
---
web/htdocs/htmllib.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 2763ed6..5577b10 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -421,24 +421,24 @@ class HTMLGenerator(OutputFunnel):
def _render_opening_tag(self, tag_name, close_tag=False, **attrs):
""" You have to replace attributes which are also python elements
such as
'class', 'id', 'for' or 'type' using a
trailing underscore (e.g. 'class_' or 'id_'). """
- self.indent_level += self.indent
+ #self.indent_level += self.indent
if not attrs:
- return "%s<%s%s>\n" % (' ' * (self.indent_level -
self.indent),\
+ return "%s<%s%s>" % (' ' * (self.indent_level -
self.indent),\
tag_name,\
' /' if close_tag else '')
else:
- return "%s<%s%s%s>\n" % (' ' * (self.indent_level -
self.indent),\
+ return "%s<%s%s%s>" % (' ' * (self.indent_level -
self.indent),\
tag_name,
''.join(self._render_attributes(**attrs)),\
' /' if close_tag else '')
def _render_closing_tag(self, tag_name):
- self.indent_level -= self.indent if self.indent_level < 0 else 0
- return "%s</%s>\n" % (' ' * self.indent_level,
tag_name)
+ #self.indent_level -= self.indent if self.indent_level < 0 else 0
+ return "%s</%s>" % (' ' * self.indent_level, tag_name)
def _render_content_tag(self, tag_name, tag_content, **attrs):
- return "%s%s%s\n%s" % (self._render_opening_tag(tag_name, **attrs),\
+ return "%s%s%s%s" % (self._render_opening_tag(tag_name, **attrs),\
' ' * self.indent_level,\
self._escape_text(tag_content),\
self._render_closing_tag(tag_name))