Michal Proszek
2a5b7e2aa3
APD-363 - [BE] do not replace tel: links with base_url ( #1 ) ( #183 )
...
* APD-363 - [BE] do not replace tel: links with base_url
* Correct typo
* Correct test html
* Correct description grammar
2017-10-25 23:04:54 +02:00
Peter Bengtsson
cfe687b05b
keep classes by default, fixes #33 ( #167 )
...
* keep classes by default, fixes #33
* full test coverage
2016-06-07 09:59:45 -04:00
Chet Corcos
914a1453a6
fix inline important tags
2016-04-13 13:07:56 -07:00
Peter Bengtsson
dcab22bd74
Merge pull request #144 from oasiswork/jd-capitalize-margin-float
...
Add an option to capitalize margin and float properties
2016-03-15 15:35:09 -04:00
Peter Bengtsson
4b05c1ea48
require requests as a dependency
2016-03-15 15:05:52 -04:00
Peter Schmidt
393dcf3aec
Add Python 3.5 support and fix new flake8 errors
2016-01-20 12:39:29 +11:00
Peter Bengtsson
95b799c6ce
pep8 fixes
2016-01-13 13:13:03 -05:00
Michael JasonSmith
8d7813a408
prevent 3 digit hex codes where applicable
2016-01-13 13:13:03 -05:00
Jocelyn Delalande
27ac936a22
Add an option to capitalize margin and float properties
...
The option is disabled by default, that weird idea comes from a weird
outlook.com behaviour to handle margin and float properties only if the
first letter is uppercase.
See https://www.emailonacid.com/blog/article/email-development/outlook.com-does-support-margins
2015-10-27 16:24:39 +01:00
David Barbarisi
9d984ba7e4
Adds a remove_unset_properties setting. Squashed commits.
2015-09-09 16:37:38 -04:00
Gustav Tiger
89e4ce2a27
Add support for adding align tags on images from css float
2015-09-05 12:11:49 +02:00
Javier Santacruz
a701c851b3
Avoid skipping links with media="all"
...
Links with `media="all"` target all devices [as the spec says](http://www.w3.org/TR/CSS2/media.html#media-types ), but premailer only processes links with `media="screen"` as :
For example, this `link` will be ignored, and it shouldn't:
```
<link rel="stylesheet" media="all" type="text/css" href="styles.css">
```
Changed check to process media types `"all"` and `"screen"`.
2015-08-14 19:09:00 +02:00
Ionel Cristian Mărieș
b0a32e1b96
Add a disable_leftover_css option that disables injecting unapplied css
...
into <head>.
2015-06-11 00:00:18 +03:00
Peter Bengtsson
e9dc872a6b
handle cssutils warnings, fixes #103
2015-06-10 09:40:35 -07:00
Thomas Grainger
06d12ddc51
Fix grammar in url value error
2015-05-11 22:53:44 +01:00
Peter Bengtsson
4535dd6ce3
always urljoin - fixes #119
2015-05-11 08:57:22 -07:00
Adam Bogdal
56c662e3bf
Add python3.2 support
2015-04-30 02:53:12 +02:00
Peter Bengtsson
a069ced2c8
Merge pull request #112 from lavr/master
...
Constant for 'data-premailer' attribute name
2015-02-23 10:21:23 -08:00
Peter Bengtsson
1714d8c8e0
fix { } balance check, fixes #111
2015-02-23 09:55:05 -08:00
Sergey Lavrinenko
808c8750f7
Constant for 'data-premailer' attribute name
2015-02-23 01:38:44 +03:00
Sergey Lavrinenko
1512ba36c4
Minor performance issue: move condition outside loop
2015-02-20 23:40:17 +03:00
Peter Bengtsson
ace324978b
smaller matrix
2015-02-19 12:33:11 -08:00
Peter Bengtsson
b43561a2ea
flake8 all the things
2015-02-19 11:24:26 -08:00
Nguyen Van Nhu
195bf9d3da
No need of this if css processing did correct job already
2015-02-18 19:32:24 +01:00
Van Nhu Nguyen
fa2caa2d80
Adding more comment and docstring in the code
2015-02-18 19:32:24 +01:00
Nguyen Van Nhu
af631b2473
Adding cache on cssutils.parseString. This taking a lot of time when the
...
content is really big. We can save a lot of time and cpu
2015-02-18 19:32:23 +01:00
Nguyen Van Nhu
605d034f65
Rewrite inline and merge styles due to performance issue of merge and
...
the way we inline style
2015-02-18 19:32:23 +01:00
Nguyen Van Nhu
9f2b7f045a
Adding cache everything that moves, must be a faster way to inline and merge style. Now under one second average instead of 6 on example mails
2015-02-14 17:28:33 +01:00
Peter Bengtsson
dc9c938b10
ignore some style sheets, fixes #97
2014-12-25 21:44:13 -05:00
Matt Molyneaux
61cdd9fa29
Make Premailer output the same type that it was given.
...
Works with either strings or ElementTree objects.
This can save time re-parsing the document if other operations need to
take place before or after Premailer.
2014-12-11 23:28:08 +00:00
Eli Dickinson
896ed7ea6e
Handle !important in CSS declarations ( fixes #49 )
...
Individual CSS declarations marked with `!important` should take
precedence over rules that would otherwise have higher priority
due to a more specific selector.
2014-12-02 09:30:15 -05:00
Jon Bretman
5d87311241
add css_text option to allow css strings to be provided
2014-10-17 01:16:28 +01:00
Peter Bengtsson
a7db869afa
Merge pull request #86 from mpj17/hg
...
Python 3
2014-10-08 11:09:07 -07:00
Michael JasonSmith
6854db1bb1
The coverage-tests do not need to handle the Python version-handling.
2014-10-08 10:53:22 -07:00
Peter Bengtsson
0e2b2a5ef2
support for python 2.6
2014-10-08 10:28:33 -07:00
Michael JasonSmith
725c9cfedf
Using a sorted() call and an OrderedDict to ensure the output is stable enough to test.
2014-09-30 19:13:01 -07:00
Michael Krens
33dfd826ec
preserve external css when keep_style_tags=True, fixes : #84
2014-09-29 23:37:02 +02:00
Michael JasonSmith
31ede1b158
Switching to BytesIO for binary data, and testing the premailer.premailer.Premailer._load_external_url method
2014-09-29 10:00:50 -07:00
Michael JasonSmith
5f80cc3ea9
Fixing the import of StringIO
2014-09-29 10:00:50 -07:00
Michael JasonSmith
4f85e5795f
Adding Python 3 compatability: mostly with the urllib, some encoiding, a string issue, and a print-statement.
2014-09-29 09:55:26 -07:00
Peter Bengtsson
28aa397f53
Merge pull request #83 from michi88/fix_keep_style_tags
...
always preserve original css
2014-09-28 13:01:03 -04:00
Michael Krens
eca800d58d
always preserve original css when keep_style_tags=True, fixes : #73 , #50 , #78
2014-09-27 14:45:03 +02:00
Michael Krens
77d5a68518
add support for vertical-align --> valign attribute
2014-09-25 21:44:55 +02:00
Peter Bengtsson
992b28dea5
100% test coverage
2014-08-21 15:30:41 -07:00
Jon Bretman
5f2002ad37
Make sure that any styles provided via external_styles that cannot be inlined are added to the head of the document in a <style> tag
2014-08-08 18:08:58 +01:00
Peter Bengtsson
2c30b74f49
only process known rule elements
2014-06-26 10:14:49 -07:00
Peter Bengtsson
8e5a9f27e1
handle CSS rules with no selectorText, fixes #71
2014-06-23 20:29:01 -07:00
Peter Bengtsson
14f7eb4fc0
comments in media queries, fixes #70
2014-05-23 11:37:33 -07:00
Albin Jacobsson
35cdb6d7db
Adding option to disable CSSParser validator
2014-05-15 11:46:36 +02:00
Peter Bengtsson
11e96de7ba
Merge pull request #66 from alex-offiserv/master
...
Fixed multithreading issue #65 ...
2014-05-06 07:41:35 -07:00