<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pierre</title>
    <description>The latest articles on DEV Community by Pierre (@pierreb).</description>
    <link>https://dev.to/pierreb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F392123%2F71ca01c2-5c73-4913-98f8-9e05d2c3602f.png</url>
      <title>DEV Community: Pierre</title>
      <link>https://dev.to/pierreb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pierreb"/>
    <language>en</language>
    <item>
      <title>Your Go MJML and Liquid libraries fail on hostile templates. I tested them all.</title>
      <dc:creator>Pierre</dc:creator>
      <pubDate>Fri, 20 Nov 2026 07:30:30 +0000</pubDate>
      <link>https://dev.to/pierreb/your-go-mjml-and-liquid-libraries-fail-on-hostile-templates-i-tested-them-all-4cfb</link>
      <guid>https://dev.to/pierreb/your-go-mjml-and-liquid-libraries-fail-on-hostile-templates-i-tested-them-all-4cfb</guid>
      <description>&lt;p&gt;While auditing the security of &lt;a href="https://www.notifuse.com" rel="noopener noreferrer"&gt;Notifuse&lt;/a&gt;, a self-hosted email platform I maintain in Go, I asked AI to generate hostile templates and ran them against every MJML library and every Liquid library I could find for the language.&lt;/p&gt;

&lt;p&gt;Notifuse users write their own email templates, in MJML for the layout and Liquid for the personalization, and my server compiles whatever they paste in. Anyone with an account can paste in something written to hurt the server.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke
&lt;/h2&gt;

&lt;p&gt;One MJML library crashes the whole process when two emails render at the same time. Another turns an escaped &lt;code&gt;&amp;amp;quot;&lt;/code&gt; back into a raw quote, so data that was escaped correctly still adds an &lt;code&gt;onclick&lt;/code&gt; attribute to the HTML. With 1 MB of inline styles, the libraries that accept the template take between one and five minutes to render it.&lt;/p&gt;

&lt;p&gt;For Liquid I used four templates: a loop of a billion iterations, a string doubled 40 times, a billion bytes of output, and 100,000 nested blocks. The Go library whose output is closest to Shopify's has no limits at all, so each of the four runs it out of time or memory. The best of the others stopped three.&lt;/p&gt;

&lt;p&gt;The Go MJML libraries didn't match MJML's output well either. The best produced the same HTML as MJML on 82.4% of my test documents, and Outlook punishes anything that drifts from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  So I wrote two engines
&lt;/h2&gt;

&lt;p&gt;I want both to be the best implementations in the world, in any language: safe-mjml for MJML and liquidgo for Liquid. That is a big claim, and the rest of this post is how I measure it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Notifuse/safe-mjml" rel="noopener noreferrer"&gt;safe-mjml&lt;/a&gt; is an MJML compiler in pure Go. It started from &lt;a href="https://github.com/preslavrachev/gomjml" rel="noopener noreferrer"&gt;gomjml&lt;/a&gt;, Preslav Rachev's Go port, which gave me a big head start. Version 1.1 follows MJML 5.4.1 and writes identical HTML on 99.3% of 8,093 test documents. Most of the remaining differences are on purpose, such as MJML writing &lt;code&gt;NaN&lt;/code&gt; as a width.&lt;/p&gt;

&lt;p&gt;For hostile templates, a panic comes back as an error. Nesting depth is limited, the HTML output is capped at 16 MB, and attribute values are always escaped.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Notifuse/liquidgo" rel="noopener noreferrer"&gt;liquidgo&lt;/a&gt; is a port of Shopify's Ruby gem, done file by file so that each Shopify release can be carried over. It stops all four hostile templates, as Shopify's own gem does, and a template never reads your Go values by reflection. Its output is identical to Shopify Liquid's on 94.2% of 963 templates, and the rest are differences I chose and wrote down. A newsletter template that loops over 50 products renders in 53 µs, against 368 µs for Shopify Liquid on Ruby 3.3 with YJIT.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try them
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go get github.com/Notifuse/safe-mjml/mjml
go get github.com/Notifuse/liquidgo/v5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both are MIT licensed and pure Go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this runs: Notifuse 44
&lt;/h2&gt;

&lt;p&gt;Both engines render every email in Notifuse 44, which came out on November 19. It is the largest release so far, with 194 changelog entries. I rebuilt almost every screen of the console on a new design system, and the editor now writes MJML 5. The &lt;a href="https://news.notifuse.com/product/notifuse-44" rel="noopener noreferrer"&gt;release post&lt;/a&gt; has the screenshots.&lt;/p&gt;

&lt;p&gt;There is a &lt;a href="https://demo.notifuse.com/console/signin?email=demo@notifuse.com" rel="noopener noreferrer"&gt;live demo&lt;/a&gt;, and the code is on &lt;a href="https://github.com/Notifuse/notifuse" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. If one of your templates makes safe-mjml or liquidgo disagree with the reference implementation, open an issue with it and I'll fix it.&lt;/p&gt;

</description>
      <category>go</category>
      <category>security</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Notifuse: modern &amp; free alternative to Mailchimp/Resend</title>
      <dc:creator>Pierre</dc:creator>
      <pubDate>Thu, 11 Sep 2025 08:49:06 +0000</pubDate>
      <link>https://dev.to/pierreb/notifuse-modern-free-alternative-to-mailchimpresend-41le</link>
      <guid>https://dev.to/pierreb/notifuse-modern-free-alternative-to-mailchimpresend-41le</guid>
      <description>&lt;p&gt;Hello DEV community,&lt;/p&gt;

&lt;p&gt;Today I'm pleased to announce the launch of a modern &amp;amp; opensource alternative to Mailchimp/Resend to send newsletters &amp;amp; transactional API 🎉&lt;/p&gt;

&lt;p&gt;👉 View the &lt;a href="https://demo.notifuse.com/signin?email=demo@notifuse.com" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 View the &lt;a href="https://github.com/Notifuse/notifuse" rel="noopener noreferrer"&gt;Github project&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz3w9u5caiffolakzb5pg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz3w9u5caiffolakzb5pg.png" alt=" " width="200" height="76"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvji39w9mm2621g3qf1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyvji39w9mm2621g3qf1l.png" alt=" " width="800" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.notifuse.com" rel="noopener noreferrer"&gt;Notifuse&lt;/a&gt; idea started in 2016 as a SaaS and has been cloned by competitors many times... but it never really took off because guess what? &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Developers don't like to pay for tech stuff.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thanks to AI acceleration I've been able to build a brand new platform in few months, fully open-source, with modern features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drag'n drop email builder with MJML+Liquid engine &lt;a href="https://www.mjmlbuilder.com" rel="noopener noreferrer"&gt;demo here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;S3 file manager&lt;/li&gt;
&lt;li&gt;A/B testing for newsletters&lt;/li&gt;
&lt;li&gt;Open/click tracking&lt;/li&gt;
&lt;li&gt;Notification center&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;I believe it's a matter of months before every closed-source SaaS gets an AI-generated clone.&lt;/p&gt;

&lt;p&gt;In the emailing/newsletter landscape the best open-source products are already outdated (Mautic, Listmonk, Sendportal, BillionMail...).&lt;/p&gt;

&lt;h2&gt;
  
  
  Differences?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The core value of an emailing platform is it's email editor &amp;amp; deliverability.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's insanely difficult to build beautiful emails that look same in every client (outlook, iOS...).&lt;/p&gt;

&lt;p&gt;For that reason existing open-source projects never bothered to create a state-of-the-art drag'n drop visual email editor.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Notifuse brings a modern email builder, built on top of MJML spec for clients compatibility &amp;amp; Liquid engine for customization.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Deliverability is guaranted by ESP integrations (AmazonSES, SparkPost, Mailgun, STMP, Postmark, Postal...) with Delivery/Bounce/Complaint webhooks handled.&lt;/p&gt;

&lt;h2&gt;
  
  
  For what?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;As a dev, you can update your transactional email templates from the Notifuse UI and send emails with a line of code&lt;/li&gt;
&lt;li&gt;Every growing project needs to send newsletters at some point... you will be glad to send a broadcast in a click&lt;/li&gt;
&lt;li&gt;It's free &amp;amp; open-source&lt;/li&gt;
&lt;li&gt;Your data stays at home&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;a href="https://docs.notifuse.com/installation" rel="noopener noreferrer"&gt;Deploy with Docker&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Golang&lt;/li&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Postgres&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;File Manager:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxufeyjol8v0l0guwzc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyxufeyjol8v0l0guwzc7.png" alt=" " width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Broadcasts:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqt266foickcdtvnlsf3a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqt266foickcdtvnlsf3a.png" alt=" " width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mailing Lists:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzh8oo4mxtlw2fd2j7brc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzh8oo4mxtlw2fd2j7brc.png" alt=" " width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Notification Center:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fak9lp4gw5chqz7xso352.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fak9lp4gw5chqz7xso352.png" alt=" " width="800" height="1333"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>opensource</category>
      <category>sass</category>
      <category>go</category>
    </item>
  </channel>
</rss>
