All Versions
10
Latest Version
Avg Release Cycle
537 days
Latest Release
208 days ago

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 escapejs filter to match Django behavior.
    • [Backwards-Incompatible] Improved striptags and removetags filters with better security (recursive stripping, iteration limits).
    • [Backwards-Incompatible] Use proper ellipsis character (โ€ฆ) in truncatechars, truncatechars_html, and urlizetrunc filters.
    • [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 urlize filter to support more TLDs.

    ๐Ÿ› Bug Fixes

    • [Backwards-Incompatible] Fix and/or operators to return actual values instead of booleans (#362).
    • ๐Ÿ›  Fix panic in cycle tag with no arguments.
    • ๐Ÿ›  Fix integer overflow when converting uint64 to int.
    • ๐Ÿ›  Fix panic on uncomparable types in comparisons.
    • ๐Ÿ›  Fix nil subscript panic.
    • ๐Ÿ›  Fix ifchanged tag to only evaluate else block if it exists.
    • ๐Ÿ›  Fix in operator type compatibility for maps.
    • ๐Ÿ›  Fix Contains method to support all map key types (float64, bool, etc.).
    • ๐Ÿ›  Fix array parser panic introduced by subscript feature.
    • ๐Ÿ‘Œ Support virtual filesystems in ssi tag plaintext mode and Error.RawLine().
    • Prevent memory exhaustion by limiting lorem tag 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 NewSet to validate that loaders are not nil.

    ๐ŸŽ Performance

    • โšก๏ธ Optimize lexer with keyword map and pre-compiled string replacer.
    • ๐Ÿ‘‰ Use pre-compiled strings.Replacer for HTML escaping filters.
    • Cache getResolvedValue() result in Value methods.
    • โšก๏ธ Optimize context valid identifier check (#340).
    • Speed optimizations for join filter on long strings.

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ ifequal and ifnotequal tags now emit deprecation warnings (use {% if %} instead).
    • ๐Ÿ—„ ssi tag is deprecated.

    ๐Ÿ’ฅ Breaking Changes

    • [Backwards-Incompatible] Remove HttpFilesystemLoader. Use FSLoader with NewFSLoader() instead, which supports Go's fs.FS interface including os.DirFS() and embed.FS.
    • [Backwards-Incompatible] Remove incomplete SandboxedFilesystemLoader. For sandboxing, use BanTag() to restrict include/import/ssi/extends tags.

    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.

  • 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

    • ๐Ÿšš removetags filter : 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/lastContent are 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 : BanFilter is now enforced inside {% filter %}
      blocks.

    ๐Ÿ”„ Changed

    • {% ssi %} plaintext mode now reads the included file through the
      ๐Ÿ”ง configured TemplateLoader chain instead of ioutil.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 any TemplateLoader.

    โœ‚ Removed

    • SandboxedFilesystemLoader and NewSandboxedFilesystemLoader have
      ๐Ÿšง been removed. They were marked WIP, never wired into any enforcement
      path, and behaved as a thin pass-through to LocalFilesystemLoader.
      Callers should use LocalFilesystemLoader directly; sandboxing should
      be implemented via a custom TemplateLoader.

    ๐Ÿ“š Documentation

    • Clarified that pongo2 does not provide a true sandbox. BanTag and
      BanFilter only refuse to compile templates that reference banned
      names; they do not isolate Go execution, restrict filesystem access,
      or contain malicious templates. README, TemplateSet field comment,
      โšก๏ธ DefaultLoader comment, 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, 2022

    v6.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.Super won't be escaped anymore by default (#301).
    • ๐Ÿ‘ nil is 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.Writerin Execute() functions and short-circuit evaluations in expressions
    • โž• Add TemplateSet.FromBytes
    • โž• Add RenderTemplateBytes
    • โž• Add Template.ExecuteWriterUnbuffered
    • โž• Add TemplateLoader interface and according functions for virtual filesystem support (incl. support for multiple loaders)
    • โž• Add pongo2.SetAutoescape for a global behavior change
    • โž• Add whitespace control for tags and blocks, supporting {%- and -%} for tags and pongo2.Options for blocks
    • โž• Add pongo2.CleanCache to remove files from the template cache
    • โž• Add support for template functions that return an error as the second return value
    • โž• Add Template.ExecuteBlocks to 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 in include-tag
    • โž• Add support for sorted-flag in for-tag with support for maps and arrays/slices
    • โž• Add block.Super support
    • โž• Add split filter
  • v3.0 Changes

    October 28, 2014

    ๐Ÿš€ See this blog post for more about the pongo2 v3 release:

    https://www.florian-schlachter.de/post/pongo2-v3/

  • v2.1 Changes

    October 28, 2014

    ๐Ÿ‘€ See more in this blog post:

    https://www.florian-schlachter.de/post/pongo2-v3/

  • v1.0 Changes

    August 08, 2014

    I'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-addons pongo2 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 verbatim does not take a parameter yet
    • ๐Ÿ‘ block.super not 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!

  • v1.0-rc1 Changes

    July 29, 2014

    ๐Ÿš€ I just finished the first release candidate for the first stable pongo2 version (1.0).