- validateHTML keeps the raw tag and handler regexes and reads the rest
through unsafeMarkup: x/net/html tokenizer, decoded attribute values,
prefix check on URL attributes, whole-value check on CSS, list
attributes, meta content and comments; any on* attribute is refused
- text is not a URL: "Metadata: Weekly" or "Big Data: Summit" as a site
name or body text no longer stops a send (CR-01)
- entity-encoded javascript: is refused whether or not the layout
opts out of inlining (WR-05)
- draft layout CSS is checked as a style element
- fixtures that pinned prose as unsafe now carry markup-level URLs;
the 35-07 subtest pinning an unsafe stored name is removed
- TestMailSafetySmoke prose_site_name and encoded_scheme
- github.com/vanng822/go-premailer v1.38.0 (default options) inlines the
rendered HTML after the safety checks; the result is checked again,
HTML without a style element is left as it is, an inliner error sends
the style block only and warns (key inline:<layout>)
- opt-out: layout header key disable_auto_inline_css, the layouts column
of the same name (migration 202611130003), LayoutFile/LayoutOverride/
Draft.DisableAutoInlineCSS; SyncIndex mirrors and ResetOverride restores
the file's value
- cabana layout form switch on the CSS tab, mapped into the layout draft
and the save validation; en/pl copy
- tests: TestMailPartialsSmoke/inline, TestMailEditorSmoke/inline_flag,
the layouts switch in TestMailScreensSmoke; CSS-slot tests read the
style block through a no-op inliner
- 35-06 Task 2 (G-35-8)
- default.htm ports WinterCMS's default layout: wrapper, header row with
the Branding logo (or the site name), the inner-body card and a
copyright footer; its text wrapper ends with the footer
- built-in header and footer partials (logo/body/url, body)
- layouts get siteName (Branding site name, else the display name of
mail.from) and year; Brand.SiteName and migration
202611130002_mail_brand_site_name
- cabana Branding form gets site_name (trimmed, max 255), mapped into the
Branding preview draft; en/pl copy; img.logo brand CSS
- 35-06 Task 1 (G-35-8)
Gap G-35-1 (supersedes D-05), tracer slice:
- postcard: migration 202611130001_mail_template_base_code (base_code
column and index); SyncIndex writes base_code; EnsureLocaleRows creates
the <template>-<locale> rows of locales that ship no file; TemplateBase
and Catalog.TemplateFor; send, preview and validation resolve a missing
<template>-<locale> to the locale's customization, else the base's
customization, else the base file. Names with their own file send as
before.
- cabana: mail locales are the translator's plus the TranslationWriter's
enabled locales; sync ensures the locale rows and re-syncs when the
locale set changes; record lookups admit fallback-locale rows; the
record title is the base code; RecordMeta.LocaleVariants
(RecordLocaleVariant) on the show and update responses.
- admin: LocaleVariantSwitcher in the update form header, from
meta.localeVariants, behind the unsaved-changes confirm.
- tests: TestMailOverrideSmoke/locale_fallback,
TestMailScreensSmoke/locales, LocaleVariantSwitcher.test.ts.
- Brand, DefaultBrand and CompileBrandCSS: thirteen colours, each checked
as a six-digit hex colour, compiled into CSS for plain elements and the
built-in layouts and partials
- once the branding row exists its compiled CSS replaces mail.brandCss;
mail.css still follows, and the file version sent after a failing
override keeps the Branding
- layouts get logoUrl, built per send from storage.uploads.public_url or
app.url through attach.AbsolutePublicURL; a logo that cannot be shown is
left out with a rate-limited warning
- Editor previews and validates a Branding draft (rule colour)
Plan 35-01, task 5.
- sample.<path> header keys and a parse-tree walker that fills every other
variable with a visible [path] placeholder, nested fields and range
targets included
- every file entry carries the sha256 of its CRLF-normalized text; the
catalog lists its files (Templates, Layouts, Partials) for admin code
- SyncIndex upserts one index row per file and never touches the override
columns of a customized row; ResetOverride returns a row to its file
- Editor validates, previews and test-sends a template, layout or partial
draft through the render path of Send and reports field and rule
- pact.RowStateCustomized and pact.RowStateOutdated
Plan 35-01, task 4.