diff --git a/premailer/__init__.py b/premailer/__init__.py index e831baa..570b55c 100644 --- a/premailer/__init__.py +++ b/premailer/__init__.py @@ -1,4 +1,4 @@ from __future__ import absolute_import, unicode_literals from .premailer import Premailer, transform -__version__ = '2.11.0' +__version__ = '3.0.0' diff --git a/premailer/premailer.py b/premailer/premailer.py index de9839d..fc157ee 100644 --- a/premailer/premailer.py +++ b/premailer/premailer.py @@ -121,7 +121,7 @@ class Premailer(object): exclude_pseudoclasses=True, keep_style_tags=False, include_star_selectors=False, - remove_classes=True, + remove_classes=False, capitalize_float_margin=False, strip_important=True, external_styles=None, diff --git a/premailer/tests/test_premailer.py b/premailer/tests/test_premailer.py index 42213d8..5cdf6a7 100644 --- a/premailer/tests/test_premailer.py +++ b/premailer/tests/test_premailer.py @@ -170,6 +170,37 @@ class Tests(unittest.TestCase): compare_html(expect_html, result_html) + def test_remove_classes(self): + """test the simplest case""" + + html = """ +
+Yes!
+ + """ + + expect_html = """ + +Yes!
+ + """ + + p = Premailer(html, remove_classes=True) + result_html = p.transform() + + compare_html(expect_html, result_html) + def test_basic_html_shortcut_function(self): """test the plain transform function""" html = """ @@ -1088,7 +1119,7 @@ b - + """ @@ -1118,7 +1149,7 @@ b - +