Skip to content

Commit

Permalink
New disable validation param
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Nov 29, 2019
1 parent b91a981 commit 9093e5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/configuration.md
Expand Up @@ -72,6 +72,7 @@ The following are reserved configuration variables that modify Appier Extras beh
| **PREMAILER_KEEP_TAGS** | `bool` | If the style tags should be kept after inlining (defaults to `True`). |
| **PREMAILER_STRIP_IMPORTANT** | `bool` | If the important marked rules should be removed on parse (defaults to `False`). |
| **PREMAILER_CACHE_CSS** | `bool` | If the parsing of the CSS should be "cached" (defaults to `False`). |
| **PREMAILER_VALIDATE_CSS** | `bool` | If the CSS structure should be validated on parse (defaults to `False`). |

### Loggly

Expand Down
2 changes: 2 additions & 0 deletions src/appier_extras/parts/admin/models/base.py
Expand Up @@ -471,6 +471,7 @@ def _inlinify_premailer(cls, data, *args, **kwargs):
keep_style_tags = appier.conf("PREMAILER_KEEP_TAGS", True, cast = bool)
strip_important = appier.conf("PREMAILER_STRIP_IMPORTANT", False, cast = bool)
cache_css = appier.conf("PREMAILER_CACHE_CSS", False, cast = bool)
validate_css = appier.conf("PREMAILER_VALIDATE_CSS", False, cast = bool)
keep_style_tags = kwargs.get("keep_style_tags", keep_style_tags)
strip_important = kwargs.get("strip_important", strip_important)
logging_level = kwargs.get(
Expand All @@ -482,6 +483,7 @@ def _inlinify_premailer(cls, data, *args, **kwargs):
keep_style_tags = keep_style_tags,
strip_important = strip_important,
cache_css_parsing = cache_css,
disable_validation = not validate_css,
cssutils_logging_level = logging_level
)
return inliner.transform()
Expand Down

0 comments on commit 9093e5b

Please sign in to comment.