Changelog History
-
v7.0.0-alpha.1 Changes
January 15, 2026๐ Features
- New filters:
json_script,safeseq,escapeseq,dictsort,unordered_list,slugify,filesizeformat,timesince,timeuntil. - [Backwards-Incompatible] Improved
escapejsfilter to match Django behavior. - [Backwards-Incompatible] Improved
striptagsandremovetagsfilters with better security (recursive stripping, iteration limits). - [Backwards-Incompatible] Use proper ellipsis character (โฆ) in
truncatechars,truncatechars_html, andurlizetruncfilters. - [Backwards-Incompatible] Empty
{% filter %}tag now returns a parse error (Django compatibility). - [Backwards-Incompatible] Empty
{% firstof %}tag now returns a parse error (Django compatibility). - ๐ Support for negative number literals in arguments.
- ๐ Support for escape sequences in string literals (
\n,\t, etc.). - ๐ Support for sorted and reversed iteration over strings.
- Inline variable definitions (
{% set foo = "bar" %}). - ๐ Expand
urlizefilter to support more TLDs.
๐ Bug Fixes
- [Backwards-Incompatible] Fix
and/oroperators to return actual values instead of booleans (#362). - ๐ Fix panic in
cycletag with no arguments. - ๐ Fix integer overflow when converting
uint64toint. - ๐ Fix panic on uncomparable types in comparisons.
- ๐ Fix nil subscript panic.
- ๐ Fix
ifchangedtag to only evaluate else block if it exists. - ๐ Fix
inoperator type compatibility for maps. - ๐ Fix
Containsmethod to support all map key types (float64, bool, etc.). - ๐ Fix array parser panic introduced by subscript feature.
- ๐ Support virtual filesystems in
ssitag plaintext mode andError.RawLine(). - Prevent memory exhaustion by limiting
loremtag generation. - Prevent infinite loop in unclosed parameterized tag situations.
- Prevent stack overflow by limiting macro call depth.
- Prevent DoS via huge parameters in certain filters.
- Prevent panic from integer divide by zero.
- ๐ Fix string indexing to return character instead of byte (Django compatibility).
- ๐ Fix
NewSetto validate that loaders are not nil.
๐ Performance
- โก๏ธ Optimize lexer with keyword map and pre-compiled string replacer.
- ๐ Use pre-compiled
strings.Replacerfor HTML escaping filters. - Cache
getResolvedValue()result in Value methods. - โก๏ธ Optimize context valid identifier check (#340).
- Speed optimizations for
joinfilter on long strings.
๐ Deprecations
- ๐
ifequalandifnotequaltags now emit deprecation warnings (use{% if %}instead). - ๐
ssitag is deprecated.
๐ฅ Breaking Changes
- [Backwards-Incompatible] Remove
HttpFilesystemLoader. UseFSLoaderwithNewFSLoader()instead, which supports Go'sfs.FSinterface includingos.DirFS()andembed.FS. - [Backwards-Incompatible] Remove incomplete
SandboxedFilesystemLoader. For sandboxing, useBanTag()to restrictinclude/import/ssi/extendstags.
Other
- Go 1.25 is now the minimum required Go version.
- โ Added comprehensive fuzz testing infrastructure.
- ๐ Comprehensive documentation overhaul with new guides for getting started, template syntax, security, and custom extensions.
Thanks to all contributors.
- New filters:
-
v6.1.0 Changes
May 02, 2026๐ Changelog
All notable changes to this project will be documented in this file.
[6.1.0] - 2026-05-02
โก๏ธ This release is primarily a security and bug-fix update. All users are
โก๏ธ encouraged to update.๐ Fixed
- ๐
removetagsfilter : tag names containing regex metacharacters no longer
panic the renderer. {% cycle %}tag : cycle index is now tracked per template execution
๐ instead of mutated on the parsed AST node. Concurrent renders of a cached
template no longer race, and sequential renders no longer leak state from
a previous execution.{% ifchanged %}tag :lastValues/lastContentare now tracked per
๐ template execution instead of mutated on the parsed AST node, fixing both
a data race under concurrent renders and state leaking between sequential
renders of a cached template.{% ifchanged %}tag : rendering an{% ifchanged %}block without
an{% else %}branch no longer crashes with a nil-pointer dereference
when the watched value is unchanged. Matches Django's behavior of
producing no output.{% filter %}tag :BanFilteris now enforced inside{% filter %}
blocks.
๐ Changed
{% ssi %}plaintext mode now reads the included file through the
๐ง configuredTemplateLoaderchain instead ofioutil.ReadFile, so
non-filesystem loaders (FSLoader,HttpFilesystemLoader, custom)
can serve SSI content.- Template error reporting (
RawLine) now reads source lines through
the template's loader chain instead of opening files directly with
os.Open. Error line extraction now works for anyTemplateLoader.
โ Removed
SandboxedFilesystemLoaderandNewSandboxedFilesystemLoaderhave
๐ง been removed. They were marked WIP, never wired into any enforcement
path, and behaved as a thin pass-through toLocalFilesystemLoader.
Callers should useLocalFilesystemLoaderdirectly; sandboxing should
be implemented via a customTemplateLoader.
๐ Documentation
- Clarified that pongo2 does not provide a true sandbox.
BanTagand
BanFilteronly refuse to compile templates that reference banned
names; they do not isolate Go execution, restrict filesystem access,
or contain malicious templates. README,TemplateSetfield comment,
โก๏ธDefaultLoadercomment, and parser error messages updated accordingly. - โ Added a Security section to the README documenting that template
loaders (LocalFilesystemLoader,HttpFilesystemLoader,FSLoader)
do not clamp paths to a base directory and that template filenames
must be treated as trusted input.
Full Changelog : v6.0.0...v6.1.0
- ๐
-
v6.0.0 Changes
June 24, 2022v6.0.0
- Go 1.18 is now the minimum required Go version.
- ๐ Improved block performance (#293).
- ๐ Support for variable subscript syntax (for maps/arrays/slices), such as
mymap["foo"]or
myarray[0](#281). - 0๏ธโฃ Backwards-incompatible change:
block.Superwon't be escaped anymore by default (#301). - ๐
nilis now supported in function calls (#277).
Thanks to all contributors.
-
v4.0.2
December 16, 2020 -
v4.0.1
November 27, 2020 -
v4.0.0 Changes
September 13, 2020๐ Changes in this long awaited release:
Library
- First semver version with Go modules compatibility
- ๐ Several bug fixes
- ๐ Improved error handling
- ๐จ Several refactorings to speed up execution and reduce allocations, including support for
io.WriterinExecute()functions and short-circuit evaluations in expressions - โ Add
TemplateSet.FromBytes - โ Add
RenderTemplateBytes - โ Add
Template.ExecuteWriterUnbuffered - โ Add
TemplateLoaderinterface and according functions for virtual filesystem support (incl. support for multiple loaders) - โ Add
pongo2.SetAutoescapefor a global behavior change - โ Add whitespace control for tags and blocks, supporting
{%-and-%}for tags andpongo2.Optionsfor blocks - โ Add
pongo2.CleanCacheto remove files from the template cache - โ Add support for template functions that return an error as the second return value
- โ Add
Template.ExecuteBlocksto render supplied list of blocks only
๐ See v3.0...v4.0.0 for a full list of changes.
Thanks to all contributors!Template Language
- โ Add support for single quotes in variables, functions and tags
- โ Add support for
if_exists-flag ininclude-tag - โ Add support for
sorted-flag infor-tag with support for maps and arrays/slices - โ Add
block.Supersupport - โ Add
splitfilter
-
v3.0 Changes
October 28, 2014๐ See this blog post for more about the pongo2 v3 release:
-
v2.1 Changes
October 28, 2014๐ See more in this blog post:
-
v1.0 Changes
August 08, 2014I'm happy to announce pongo2 v1.0 , the first stable release.
๐ฆ pongo2 aims to be compatible with Django 1.7 with regards to syntax, filters and tags. In combination with my official package
pongo2-addonspongo2 offers even more filters/tags including humanization and markup features.๐ All version 1.x releases will remain backwards compatible (only API improvements are possible, but no changes to any existing API functions/symbols). You can use the special import path
gopkg.in/flosch/pongo2.v1๐ to stick with version 1.x releases in your projects.
List of TODOs which could effect users of version 1.0:
- ๐ท tag
verbatimdoes not take a parameter yet - ๐
block.supernot supported yet Value.Iterate()over strings is not utf-8 compatible yet (probably rarely used by users)
Please also have a look on the caveats and on the development status hints when using pongo2.
๐ pongo2 got a playground; feel free to play with it and to try pongo2 out.
๐ I'm always glad about any feedback. I hope you enjoy this release!
- ๐ท tag
-
v1.0-rc1 Changes
July 29, 2014๐ I just finished the first release candidate for the first stable pongo2 version (1.0).