diff --git a/HISTORY.md b/HISTORY.md
index b796720..b7935f6 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -3,6 +3,7 @@
 2.1.0 (unreleased)
 ------------------
 
+- Do not render a spurious `=""` when new lines appear inside a tag (Refs. #35) [ale-rt]
 - The attributes renderer knows about the element indentation
   and for indents the attributes consequently [ale-rt]
 - The ZCML element has now its custom tag templates, this simplifies the code [ale-rt]
diff --git a/zpretty/prettifier.py b/zpretty/prettifier.py
index 3e6cf5a..4468653 100644
--- a/zpretty/prettifier.py
+++ b/zpretty/prettifier.py
@@ -33,6 +33,11 @@ class ZPrettifier(object):
             for line in text.splitlines()
         )
         self.soup = self.get_soup(self.text)
+
+        # Cleanup all spurious self._newlines_marker attributes, see #35
+        for el in self.soup.find_all(attrs={self._newlines_marker: ""}):
+            el.attrs.pop(self._newlines_marker, None)
+
         self.root = self.pretty_element(self.soup, -1)
 
     def get_soup(self, text):

diff --git a/zpretty/tests/test_zpretty.py b/zpretty/tests/test_zpretty.py
index 0db7440..17eb548 100644
--- a/zpretty/tests/test_zpretty.py
+++ b/zpretty/tests/test_zpretty.py
@@ -152,6 +152,17 @@ class TestZpretty(TestCase):
             "<root>\n (<a></a>)\n</root>", "<root>\n  (<a></a>)\n</root>\n"
         )
 
+    def test_elements_with_new_lines(self):
+        self.assertPrettified("<root\n></root>", "<root></root>\n")
+        self.assertPrettified(
+            '<root\na="b"\n\n></root>',
+            ('<root a="b"></root>\n'),
+        )
+        self.assertPrettified(
+            '<root\na="b"\n\nc="d"></root>',
+            ('<root a="b"\n      c="d"\n></root>\n'),
+        )
+
     def test_entities(self):
         self.assertPrettified("<root>&nbsp;</root>", "<root>&nbsp;</root>\n")
 

empty lines in tag lead to invalid attributes
when test.html is
```
<select id="workflow_action"
        name="workflow_action"
        
></select>
```
then ``$ zpretty test.html`` produces this output:
```
<select id="workflow_action"
        =""
        name="workflow_action"
></select>
```

Or general test.html:
```
<tag attr="ok"

></tag>
```

leads to:
```
<tag =""
     attr="ok"
></tag>
```
zpretty/tests/test_zpretty.py::TestZpretty::test_elements_with_new_lines
zpretty/tests/test_zpretty.py::TestZpretty::test_boolean_attributes zpretty/tests/test_zpretty.py::TestZpretty::test_element_repr zpretty/tests/test_zpretty.py::TestZpretty::test_entities zpretty/tests/test_zpretty.py::TestZpretty::test_fix_self_closing zpretty/tests/test_zpretty.py::TestZpretty::test_format_self_closing_tag zpretty/tests/test_zpretty.py::TestZpretty::test_many_children zpretty/tests/test_zpretty.py::TestZpretty::test_nesting_no_text zpretty/tests/test_zpretty.py::TestZpretty::test_nesting_with_tail zpretty/tests/test_zpretty.py::TestZpretty::test_nesting_with_text zpretty/tests/test_zpretty.py::TestZpretty::test_sample_html zpretty/tests/test_zpretty.py::TestZpretty::test_sample_pt zpretty/tests/test_zpretty.py::TestZpretty::test_single_quotes_in_attrs zpretty/tests/test_zpretty.py::TestZpretty::test_text_close_to_an_element zpretty/tests/test_zpretty.py::TestZpretty::test_text_with_markup zpretty/tests/test_zpretty.py::TestZpretty::test_whitelines_not_stripped