New features
- added --asin flag to be able to set ASIN during conversion if necessary
Bug Fixes
Critical
- Fixed hyphenation for non-ASCII languages (Cyrillic, Greek, etc.) — byte/rune index confusion caused pattern weights to be silently lost
- Fixed race condition on global
slug.Lowercasein concurrent transliteration calls
High
SecretStringno longer leaks secrets viafmt.Sprintf/%v— addedString()andGoString()methods- CSS
url()resolution now usesos.DirFSto prevent arbitrary file reads via path traversal - Added 256 MB limit on base64 binary decoding to prevent OOM from malicious FB2 files
- Added 8192x8192 dimension cap on SVG rasterization to prevent OOM
- Fixed infinite loop in JPEG quality detection on crafted input
- Fixed JPEG SOI header validation (
&&→||) — single-byte corruption no longer passes
Medium
- Added Zip Slip protection in archive walker — rejects entries with
../or absolute paths - Fixed temp directory leak in
Prepare()on both error and success paths - Fixed off-by-one in
trie.allSubstrings()— now matchesallSubstringsAndValues()behavior - Fixed CSS injection — selector and
url()values are now properly escaped - Fixed
parseDimension— rewritten to correctly reject malformed CSS dimensions - Eliminated stale
Imports/FontFacessync bug by replacing fields with methods - Removed dead code in
indexHref— replacedurl.Parse()with explicit scheme allowlist encodeImagenow returns an error for unsupported formats instead of silentnil, nil- Fixed
Report.Close()— botharc.Close()andr.file.Close()errors are now reported viaerrors.Join - Fixed
%v→%win error wrapping inconfig.Dump() - Fixed case-sensitivity mismatch in MHL connector — target is now normalized to lowercase
- Fixed
isTitleEmpty— now recurses into child segments viaAsPlainText()
Performance
- Replaced
+=string concatenation withstrings.Builderin hot hyphenation loops - Cached HTML entities JSON parsing with
sync.Once— no longer re-parsed on everyPrepare() - Moved
isKnownTextTagmap to package level — no longer allocated per call - Fixed O(n²)
AsTOCText— trackslastByteinstead of callingbuf.String()in loop - Replaced
strings.NewReader(string(bytes))withbytes.NewReaderto avoid copy - Converted recursive
parseDescendantSelectorto iterative loop (eliminates stack overflow risk)
Robustness
- Added
ColSpan/RowSpanclamping tomax(v, 1) CleanFileNamenow strips NUL bytesStoreCopytemp directories are now cleaned up on all pathstruncateTextnow slices by runes, not bytes — no more split UTF-8- Zip writer close error in
kfxdumpis now captured - Added 2-minute timeout on MHL child process via
exec.CommandContext - Child process stderr is now forwarded to
os.Stderr binary.Writein JPEG header rewrite replaced with directbinary.BigEndian.PutUint16into fixed array- Iterator
yieldreturn values are now checked at all call sites
Maintenance
- Extracted 8 default vignette SVGs and 2 placeholder SVGs to
//go:embedfiles - Added
//go:build windowsconstraint to MHL connector - Fixed YAML config tag typo:
jpeq_quality_level→jpeg_quality_level(breaking — existing config files need updating) - Fixed typos: "unnesessary", "deffered", "exits"→"exists", "wich"→"which", and others
- Removed dead
imageChangedflag for SVG path - Updated
Sentencesiterator doc to reflect actual behavior - Updated
docs/guide.mdanddocs/stylesheets.mdfor CSS security changes and config rename
Full Changelog: v1.0.0...v1.1.0