Automattic / Automattic/juice

Juice-ing Templates with XSL

Open
#372 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.3k
Forks
233
Avg merge
1d 10h
Merged PRs (30d)
8

Description

Hi all,

I'm trying to use Juice to inline CSS for html emails, which use XSL to inject information from XML files. I'm wondering if anyone has experience using Juice to inline CSS templates with this format. My headers, for example, look like this:

```

--- HTML CODE ---

]]>

{{{email_subject}}}
]]>

```

The issues I'm facing are as follows:

1. Using xmlMode true **or** false either breaks meta tags and img tags, or title tags.
2. The codeBlocks don't seem to change the behavior whatsoever.
3. Particularly bad is the effect Juice has on a Google Analytics pixel I've inserted in my email. Juice deforms the URL into src="data:image/gif;base64,..." Very strange behavior indeed.

Any help / insights on this would be greatly appreciated!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the XSL-wrapped HTML example with xmlMode set to true and false, including the meta, img, title, and Google Analytics pixel cases. Compare the resulting markup and test whether codeBlocks changes parsing; done means Juice preserves the expected tags and pixel URL while inlining CSS.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, javascript
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.