diff --git a/.blazar-enabled b/.blazar-enabled
new file mode 100644
index 000000000..e69de29bb
diff --git a/.blazar.yaml b/.blazar.yaml
new file mode 100644
index 000000000..5727ecbff
--- /dev/null
+++ b/.blazar.yaml
@@ -0,0 +1,2 @@
+buildResources:
+ memoryMb: 10240
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..10338025d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,34 @@
+name: ci
+
+on: [ push, pull_request ]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: [ 17, 21, 25 ]
+ name: jdk-${{ matrix.java }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-java@v3
+ with:
+ distribution: "temurin"
+ # The JDK listed last will be the default and what Maven runs with
+ # https://github.com/marketplace/actions/setup-java-jdk#install-multiple-jdks
+ java-version: |
+ ${{ matrix.java }}
+ 25
+ cache: "maven"
+ - name: "Build"
+ run: |
+ mvn \
+ --batch-mode \
+ -no-transfer-progress \
+ -V \
+ -Dproject.build.jdk.version=${{ matrix.java }} \
+ verify
+ env:
+ JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED
diff --git a/.gitignore b/.gitignore
index 98b552ee2..98bd98285 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@
.DS_Store
# Maven
+dependency-reduced-pom.xml
log/
target/
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 000000000..c32394f14
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ private static final String WRAPPER_VERSION = "0.5.5";
+ /**
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+ */
+ private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+ /**
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+ * use instead of the default one.
+ */
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+ ".mvn/wrapper/maven-wrapper.properties";
+
+ /**
+ * Path where the maven-wrapper.jar will be saved to.
+ */
+ private static final String MAVEN_WRAPPER_JAR_PATH =
+ ".mvn/wrapper/maven-wrapper.jar";
+
+ /**
+ * Name of the property which should be used to override the default download url for the wrapper.
+ */
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+ public static void main(String args[]) {
+ System.out.println("- Downloader started");
+ File baseDirectory = new File(args[0]);
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
+ // wrapperUrl parameter.
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+ String url = DEFAULT_DOWNLOAD_URL;
+ if(mavenWrapperPropertyFile.exists()) {
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
+ try {
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+ Properties mavenWrapperProperties = new Properties();
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+ } catch (IOException e) {
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+ } finally {
+ try {
+ if(mavenWrapperPropertyFileInputStream != null) {
+ mavenWrapperPropertyFileInputStream.close();
+ }
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ }
+ System.out.println("- Downloading from: " + url);
+
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+ if(!outputFile.getParentFile().exists()) {
+ if(!outputFile.getParentFile().mkdirs()) {
+ System.out.println(
+ "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+ }
+ }
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+ try {
+ downloadFileFromURL(url, outputFile);
+ System.out.println("Done");
+ System.exit(0);
+ } catch (Throwable e) {
+ System.out.println("- Error downloading");
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+ if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+ String username = System.getenv("MVNW_USERNAME");
+ char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(username, password);
+ }
+ });
+ }
+ URL website = new URL(urlString);
+ ReadableByteChannel rbc;
+ rbc = Channels.newChannel(website.openStream());
+ FileOutputStream fos = new FileOutputStream(destination);
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+ fos.close();
+ rbc.close();
+ }
+
+}
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 000000000..0d5e64988
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 000000000..63721ca45
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar
diff --git a/.prettier-java-enabled b/.prettier-java-enabled
new file mode 100644
index 000000000..e69de29bb
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6efea5798..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: java
-jdk:
- - oraclejdk8
-install: mvn install -DskipTests=false -Dgpg.skip=true
-
diff --git a/CHANGES.md b/CHANGES.md
index 9ee50d5b3..487dc412a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,9 +1,533 @@
# Jinjava Releases #
+### 2026-07-24 Version 2.8.4 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.8.4/jar)) ###
+* [Add support for configurable multi-character delimiters](https://github.com/HubSpot/jinjava/pull/1305)
+* [Treat backslash as an escape character only inside quoted strings, matching Jinja2](https://github.com/HubSpot/jinjava/pull/1306)
+* [Add `keepTrailingNewline` option to match Python Jinja2's default of stripping a single trailing newline](https://github.com/HubSpot/jinjava/pull/1311)
+* [Auto-convert `Integer` to `Long` in set filters when the feature is enabled](https://github.com/HubSpot/jinjava/pull/1308)
+* [Add a boolean parameter to `withUnwrapRawOverride`](https://github.com/HubSpot/jinjava/pull/1313)
+* [Introduce `BuiltinFeatures`](https://github.com/HubSpot/jinjava/pull/1289)
+* [Preserve block tags to maintain reconstruction and execution order](https://github.com/HubSpot/jinjava/pull/1312)
+* [Fix `RenderFilter`'s handling of deferred values](https://github.com/HubSpot/jinjava/pull/1258)
+* [Use `isResolvableObject` before building a hashcode in eager execution](https://github.com/HubSpot/jinjava/pull/1286)
+* [Don't require explicitly pushing the `JinjavaInterpreter` when using it directly](https://github.com/HubSpot/jinjava/pull/1285)
+
+### 2026-02-02 Version 2.8.3 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.8.3/jar)) ###
+* Disallow accessing properties on restricted classes while rendering through ForTag
+* Upgrade jackson to version 2.20
+* [Add performance optimization to chained filters](https://github.com/HubSpot/jinjava/pull/1274)
+
+### 2026-02-02 Version 2.7.6 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.7.6/jar)) ###
+* Disallow accessing properties on restricted classes while rendering through ForTag
+* Upgrade jackson to version 2.20
+
+### 2025-10-22 Version 2.8.2 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.8.2/jar)) ###
+* [Fix helper token escape handling and unescaping when unquoting strings](https://github.com/HubSpot/jinjava/pull/1263)
+
+### 2025-09-30 Version 2.7.5 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.7.5/jar)) ###
+* Disallow accessing properties on restricted classes while rendering
+
+### 2025-09-16 Version 2.8.1 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.8.1/jar)) ###
+* Disallow accessing properties on restricted classes while rendering
+* [Make stack operations use AutoCloseable for safer usage with try-with-resources](https://github.com/HubSpot/jinjava/pull/1250)
+
+### 2025-05-05 Version 2.8.0 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.8.0/jar)) ###
+* [Target Java 17](https://github.com/HubSpot/jinjava/pull/1238)
+* [Implement PyMap#get with optional default](https://github.com/HubSpot/jinjava/pull/1233)
+* [Fix ConcurrentModificationException when sharing Context across threads](https://github.com/HubSpot/jinjava/pull/1239)
+* [Fix max render depth tracking for {% call %} tags](https://github.com/HubSpot/jinjava/pull/1229)
+
+### 2024-12-06 Version 2.7.4 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.7.4/jar)) ###
+* [Implement jinja2.ext.loopcontrols extensions (break and continue)](https://github.com/HubSpot/jinjava/pull/1219)
+* [Apply whitespace rules for LStrip and Trim to comment blocks](https://github.com/HubSpot/jinjava/pull/1217)
+### 2024-09-12 Version 2.7.3 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.7.3/jar)) ###
+* [Add support for numeric keys in map literal](https://github.com/HubSpot/jinjava/pull/1152)
+* [Add feature to consider undefined variable a TemplateError](https://github.com/HubSpot/jinjava/pull/1174)
+* [Improve Optional value serialization](https://github.com/HubSpot/jinjava/pull/1175)
+* [Fix bug where extends roots were processed inside of the RenderFilter](https://github.com/HubSpot/jinjava/pull/1159)
+* [Don't allow illegal characters in XmlAttrFilter](https://github.com/HubSpot/jinjava/pull/1179)
+* [Limit string length in `+` and `~` operators](https://github.com/HubSpot/jinjava/pull/1161)
+* Fix various RuntimeExceptions in filters and functions
+* Updates dependency versions
+### 2024-02-12 Version 2.7.2 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.7.2/jar)) ###
+* [Use interpreter's locale for strftime functions](https://github.com/HubSpot/jinjava/pull/1109)
+* [Prevent infinite hashCode recursion in PyList or PyMap](https://github.com/HubSpot/jinjava/pull/1112)
+* [Support aliasing macro function names in {% from %} tag](https://github.com/HubSpot/jinjava/pull/1117)
+* [Add whitespace trimming functionality for notes and expressions](https://github.com/HubSpot/jinjava/pull/1122)
+* [Add feature to prevent accidental expressions from being output](https://github.com/HubSpot/jinjava/pull/1123)
+* [Add length-limiting to |render filter and add |closehtml filter](https://github.com/HubSpot/jinjava/pull/1128)
+* [Add length-limiting to |tojson filter](https://github.com/HubSpot/jinjava/pull/1131)
+* [Make |pprint filter output in JSON format](https://github.com/HubSpot/jinjava/pull/1132)
+* [Allow for loop with `null` values](https://github.com/HubSpot/jinjava/pull/1140)
+* [Add length-limiting when coercing strings](https://github.com/HubSpot/jinjava/pull/1142)
+* [Add `ECHO_UNDEFINED` feature](https://github.com/HubSpot/jinjava/pull/1150)
+* Various PRs for eager execution to support two-phase rendering.
+
+### 2023-08-11 Version 2.7.1 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.7.1/jar)) ###
+* [Introduce `{% do %}` blocks](https://github.com/HubSpot/jinjava/pull/1030)
+* [Add warnings for unclosed tokens](https://github.com/HubSpot/jinjava/pull/1093)
+* [Fix `|default(null)` behavior](https://github.com/HubSpot/jinjava/pull/1008)
+* [Improve EscapeJinjavaFilter](https://github.com/HubSpot/jinjava/pull/1027)
+* [Improve BeanELResolver Extensibility](https://github.com/HubSpot/jinjava/pull/1028)
+* [Add snake_case serialization config option](https://github.com/HubSpot/jinjava/pull/1031)
+* [Add generic node pre/post processors](https://github.com/HubSpot/jinjava/pull/1045)
+* [Upgrade jackson to 2.14.0](https://github.com/HubSpot/jinjava/pull/1051)
+* [Upgrade jsoup to 1.15.3](https://github.com/HubSpot/jinjava/pull/927)
+* [Upgrade guava to 31.1](https://github.com/HubSpot/jinjava/pull/1103)
+* [Add feature flags to JinjavaConfig](https://github.com/HubSpot/jinjava/pull/1066)
+* [Make restricted methods and properties configurable](https://github.com/HubSpot/jinjava/pull/1076)
+* [Gracefully handle invalid escaped quotes](https://github.com/HubSpot/jinjava/pull/1098)
+* [Warn when datetime filters use null arguments](https://github.com/HubSpot/jinjava/pull/1064)
+* [Fix interpreter scope inside striptags filter](https://github.com/HubSpot/jinjava/pull/1068)
+* Fix various RuntimeExceptions in filters and functions
+* Various PRs for eager execution to support two-phase rendering.
+
+### 2023-03-03 Version 2.7.0 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.7.0/jar)) ###
+* [Use number operations for multiply and divide filters](https://github.com/HubSpot/jinjava/pull/766)
+* [Add config to require whitespace in tokens](https://github.com/HubSpot/jinjava/pull/773)
+* [Make reject filter the inverse of select filter](https://github.com/HubSpot/jinjava/pull/790)
+* [Make ObjectMapper configurable via JinjavaConfig](https://github.com/HubSpot/jinjava/pull/815)
+* [Limit rendering cycle detection to expression nodes](https://github.com/HubSpot/jinjava/pull/817)
+* [Add URL decode filter](https://github.com/HubSpot/jinjava/pull/840)
+* [Fix truthiness of numbers between 0 and 1](https://github.com/HubSpot/jinjava/pull/857)
+* [Fix macro function scoping inside of another macro function](https://github.com/HubSpot/jinjava/pull/869)
+* [Handle thread interrupts by throwing an InterpretException](https://github.com/HubSpot/jinjava/pull/870)
+* [Fix right-side inline whitespace trimming](https://github.com/HubSpot/jinjava/pull/885)
+* [Fix Jinjava functionality for duplicate macro functions and call tags](https://github.com/HubSpot/jinjava/pull/889)
+* [Fix custom operator precedence](https://github.com/HubSpot/jinjava/pull/902)
+* [Parse leading negatives in expression nodes](https://github.com/HubSpot/jinjava/pull/896)
+* [add keys function to dictionary](https://github.com/HubSpot/jinjava/pull/936)
+* [Update title filter to ignore special characters](https://github.com/HubSpot/jinjava/pull/945)
+* [add unescape_html filter](https://github.com/HubSpot/jinjava/pull/967)
+* [Move object unwrap behavior to config object](https://github.com/HubSpot/jinjava/pull/983)
+* [Get best invoke method based on parameters](https://github.com/HubSpot/jinjava/pull/996)
+* [Create format_number filter](https://github.com/HubSpot/jinjava/pull/999)
+* [Get current date and time from a provider](https://github.com/HubSpot/jinjava/pull/1007)
+* [Create context method for checking if in for loop](https://github.com/HubSpot/jinjava/pull/1015)
+* [Filter duplicate template errors](https://github.com/HubSpot/jinjava/pull/1016)
+* Fix various NullPointerExceptions in filters and functions
+* Various changes to reduce non-deterministic behavior
+* Various changes to improve datetime formatting and exception handling
+* Various PRs for eager execution to support two-phase rendering.
+
+### 2021-10-29 Version 2.6.0 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.6.0/jar)) ###
+* [Create interface for object truth values](https://github.com/HubSpot/jinjava/pull/747)
+* [Catch concurrent modification in for loop](https://github.com/HubSpot/jinjava/pull/750)
+* [Add Originating Exception Message For A TemplateSyntaxException](https://github.com/HubSpot/jinjava/pull/753)
+* [Throw a template error when attempting to divide by zero](https://github.com/HubSpot/jinjava/pull/754)
+* [Make unixtimestamp behave the same as System.currentTimeMillis()](https://github.com/HubSpot/jinjava/pull/755)
+* [handle null argument in range function](https://github.com/HubSpot/jinjava/pull/758)
+* [Track Current Processed Node In The Context](https://github.com/HubSpot/jinjava/pull/760)
+* [Add Base 64 encode and decode filters](https://github.com/HubSpot/jinjava/pull/763)
+
+### 2021-09-02 Version 2.5.10 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.5.10/jar)) ###
+* [Make LazyExpression memoization disable-able](https://github.com/HubSpot/jinjava/pull/673)
+* [Add new MapELResolver with type coercion to support accessing enum keys](https://github.com/HubSpot/jinjava/pull/688)
+* Add methods to [remove error from interpreter](https://github.com/HubSpot/jinjava/pull/694),
+ [get the last error](https://github.com/HubSpot/jinjava/pull/695),
+ and [remove the last error](https://github.com/HubSpot/jinjava/pull/696)
+* [Pass value of throwInterpreterErrors to child contexts](https://github.com/HubSpot/jinjava/pull/697)
+* [Support Assignment Blocks with Set tags](https://github.com/HubSpot/jinjava/pull/698)
+* [Handle spaces better in for loop expressions](https://github.com/HubSpot/jinjava/pull/706)
+* [Support "not in"](https://github.com/HubSpot/jinjava/pull/707)
+* [Set propertyResolved after evaluating the AbstractCallableMethod](https://github.com/HubSpot/jinjava/pull/708)
+* [Limit infinite evaluation from recursive extends tags](https://github.com/HubSpot/jinjava/pull/719)
+* [Fix striptags to clean HTML instead of parsing](https://github.com/HubSpot/jinjava/pull/733)
+* Various PRs for eager execution to support two-phase rendering.
+
+### 2021-05-21 Version 2.5.9 ([Maven Central](https://search.maven.org/artifact/com.hubspot.jinjava/jinjava/2.5.9/jar)) ###
+* [fix how current paths are tracked via multiple levels of inheritance with the `{% extends %}` tag](https://github.com/HubSpot/jinjava/pull/667)
+
+### 2021-05-20 Version 2.5.8 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.8%7Cjar)) ###
+* Various PRs for eager execution to support two-phase rendering.
+* [Add rangeLimit to JinjavaConfig](https://github.com/HubSpot/jinjava/pull/658)
+* [Add namespace functionality](https://github.com/HubSpot/jinjava/pull/649)
+* [Fix capitalize and title filters](https://github.com/HubSpot/jinjava/pull/661)
+
+### 2021-04-09 Version 2.5.7 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.7%7Cjar)) ###
+* Various PRs for support EagerTokens and two-phase rendering via ChunkResolver.
+* [Preserve Raw Tags Config](https://github.com/HubSpot/jinjava/pull/518)
+* [Change config name to preserveForFinalPass](https://github.com/HubSpot/jinjava/pull/520)
+* [Ensure that after pushing the interpreter, it gets popped](https://github.com/HubSpot/jinjava/pull/521)
+* [Python Booleans and Filter base with parsing](https://github.com/HubSpot/jinjava/pull/523)
+* [toyaml/fromyaml filters](https://github.com/HubSpot/jinjava/pull/524)
+* [Add ChunkResolver to partially resolve expressions](https://github.com/HubSpot/jinjava/pull/525)
+* [Simply JinjavaConfig construction](https://github.com/HubSpot/jinjava/pull/528)
+* [Add size limited pymaps and pylists](https://github.com/HubSpot/jinjava/pull/530)
+* [Remove overrides for append and insert](https://github.com/HubSpot/jinjava/pull/536)
+* [Filter upgrades to support kw params](https://github.com/HubSpot/jinjava/pull/531)
+* [Check if list index is numeric before parsing to int](https://github.com/HubSpot/jinjava/pull/538)
+* [Rethrow CollectionTooBigExceptions in resolver](https://github.com/HubSpot/jinjava/pull/541)
+* [Add error for collection too big](https://github.com/HubSpot/jinjava/pull/550)
+* [Fix args for aliased functions](https://github.com/HubSpot/jinjava/pull/551)
+* [Add filter to interpret a string early](https://github.com/HubSpot/jinjava/pull/570)
+* [Variable function evaluator](https://github.com/HubSpot/jinjava/pull/572)
+* [Check that disabled library map isn't null](https://github.com/HubSpot/jinjava/pull/573)
+* [Pyish String representations of objects](https://github.com/HubSpot/jinjava/pull/581)
+* [Intial support for vsCodeTagSnippets](https://github.com/HubSpot/jinjava/pull/589)
+* [Fix documentation for truncate function](https://github.com/HubSpot/jinjava/pull/594)
+* [Fix bug with whitespace controls not applying properly](https://github.com/HubSpot/jinjava/pull/599)
+* [Allow replace filter on non-strings](https://github.com/HubSpot/jinjava/pull/603)
+* [Add function and filter to convert string to date](https://github.com/HubSpot/jinjava/pull/608)
+* [Expose jinjava snippets throught the jinjava object](https://github.com/HubSpot/jinjava/pull/622)
+* [Output pyish versions of objects using legacy override flag](https://github.com/HubSpot/jinjava/pull/621)
+* [Trim before checking if expression is quoted](https://github.com/HubSpot/jinjava/pull/623)
+* [Fix tuple parsing bug](https://github.com/HubSpot/jinjava/pull/627)
+* [Fix NPE around code snippets documentation](https://github.com/HubSpot/jinjava/pull/630)
+
+### 2020-10-07 Version 2.5.6 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.6%7Cjar)) ###
+* [Accept ip address without network prefix in ipaddr('address') filter](https://github.com/HubSpot/jinjava/pull/512)
+* [Expression test parity with jinja including isIterable](https://github.com/HubSpot/jinjava/pull/510)
+* [Support IN operator for dictionaries](https://github.com/HubSpot/jinjava/pull/493)
+* [Disallow adding a pyMap to itself](https://github.com/HubSpot/jinjava/pull/489)
+* [Disallow adding a map to itself](https://github.com/HubSpot/jinjava/pull/474)
+
+### 2020-06-23 Version 2.5.5 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.5%7Cjar)) ###
+* [TagCycleException was thrown when rendering template that doesn't have any cycles](https://github.com/HubSpot/jinjava/pull/445)
+* [Make global context thread-safe](https://github.com/HubSpot/jinjava/pull/445)
+* [Defer variables used in deferred](https://github.com/HubSpot/jinjava/pull/449)
+* [Check for nulls in range function](https://github.com/HubSpot/jinjava/pull/452)
+* [Fix for "Equalto operator doesn't work in "or" statement (== does)"](https://github.com/HubSpot/jinjava/pull/455)
+
+### 2020-05-01 Version 2.5.4 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.4%7Cjar)) ###
+* [Remove hacky replaceL behavior](https://github.com/HubSpot/jinjava/pull/407)
+* [Add over limit to template errors](https://github.com/HubSpot/jinjava/pull/412)
+* [Fix several parse errors](https://github.com/HubSpot/jinjava/pull/413)
+* [Add support for Custom Token Scanner Symbols](https://github.com/HubSpot/jinjava/pull/410)
+* [Remove print statements from test](https://github.com/HubSpot/jinjava/pull/417)
+* [Check for null Config](https://github.com/HubSpot/jinjava/pull/418)
+* [Remove reference to TokenScannerSymbols in Nodes and Tokens](https://github.com/HubSpot/jinjava/pull/419)
+* [Add to host blacklist for security](https://github.com/HubSpot/jinjava/pull/426)
+* [Update blacklist error message copy](https://github.com/HubSpot/jinjava/pull/428)
+* [Allow ELResolver to be configured](https://github.com/HubSpot/jinjava/pull/432)
+* [Add interpreter to blacklist](https://github.com/HubSpot/jinjava/pull/435)
+
+### 2020-03-06 Version 2.5.3 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.3%7Cjar)) ###
+* [Return empty string for un-evaluated lazy expression](https://github.com/HubSpot/jinjava/pull/405)
+* [Add millis precision to unixtimestamp function](https://github.com/HubSpot/jinjava/pull/399)
+* [Fix implementation for slice filter](https://github.com/HubSpot/jinjava/pull/398)
+* [Implement safe filter as SafeString and handle SafeString in filters, functions and expressions](https://github.com/HubSpot/jinjava/pull/394)
+* [Add PyList support to ForTag](https://github.com/HubSpot/jinjava/pull/390)
+* [Change DefaultFilter to implement AdvancedFilter](https://github.com/HubSpot/jinjava/pull/389)
+* [Adds dict support for DefaultFilter](https://github.com/HubSpot/jinjava/pull/386)
+* [Add basic deferred value support for from tag](https://github.com/HubSpot/jinjava/pull/381)
+* [Fix template error line numbers](https://github.com/HubSpot/jinjava/pull/380)
+* [Track dependencies in FromTag](https://github.com/HubSpot/jinjava/pull/375)
+* [Lower logging level for truncate](https://github.com/HubSpot/jinjava/pull/372)
+* [Handling for OutputTooBigException](https://github.com/HubSpot/jinjava/pull/371)
+* [Serialize lazy expression as its underlying value](https://github.com/HubSpot/jinjava/pull/370)
+* [Return image when calling toString for LazyExpression](https://github.com/HubSpot/jinjava/pull/367)
+* [More supplier conversions](https://github.com/HubSpot/jinjava/pull/366)
+* [Avoid tag cycles when keeping track of parent paths for blocks ](https://github.com/HubSpot/jinjava/pull/363)
+* [Add python list operations to PyList](https://github.com/HubSpot/jinjava/pull/362)
+* [Fix NPE with lazy expression in intermediate expression resolution](https://github.com/HubSpot/jinjava/pull/358)
+* [Create new class that lazily resolves](https://github.com/HubSpot/jinjava/pull/357)
+* [Upgrade map filter to advanced filter, improve error messages, and pass through args for filters](https://github.com/HubSpot/jinjava/pull/356)
+* [enable more checkstyle rules](https://github.com/HubSpot/jinjava/pull/355)
+* [Add codeStyleChecker](https://github.com/HubSpot/jinjava/pull/353)
+
+### 2019-07-11 Version 2.5.2 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.2%7Cjar)) ###
+* [Add type conversion to collection expression tests](https://github.com/HubSpot/jinjava/pull/349)
+* [Change initialization of JinjavaInterpreter to instantiation](https://github.com/HubSpot/jinjava/pull/347)
+* [Resolve Failure on Unknown Incompatible with default filter](https://github.com/HubSpot/jinjava/pull/345)
+* [Add initial support for resolving relative paths](https://github.com/HubSpot/jinjava/pull/343)
+* [Add dummy object for validation mode](https://github.com/HubSpot/jinjava/pull/341)
+* [Implements equals() and hashCode() methods for TemplateError](https://github.com/HubSpot/jinjava/pull/340)
+
+### 2019-06-07 Version 2.5.1 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.1%7Cjar)) ###
+* [Support more ipaddr filters](https://github.com/HubSpot/jinjava/pull/338)
+* [Upgrade to newer basepom](https://github.com/HubSpot/jinjava/pull/334)
+* [Support empty bracket implicit index syntax](https://github.com/HubSpot/jinjava/pull/331)
+* [Support nominative date formats](https://github.com/HubSpot/jinjava/pull/330)
+* [Add a warning for unclosed comments](https://github.com/HubSpot/jinjava/pull/329)
+* [Add a warning when there is no matching start tag for an end tag](https://github.com/HubSpot/jinjava/pull/326)
+* [Add child dependency to parent dependencies](https://github.com/HubSpot/jinjava/pull/325)
+* [Rewrite sort filter to address several problems](https://github.com/HubSpot/jinjava/pull/323)
+* [Fix cycle reference during serialization](https://github.com/HubSpot/jinjava/pull/319)
+* [Add support for resolving relative paths in separate files](https://github.com/HubSpot/jinjava/pull/316)
+* [Return long value from int filter if over max int length](https://github.com/HubSpot/jinjava/pull/315)
+* [Use type converter when evaulting 'in'](https://github.com/HubSpot/jinjava/pull/314)
+* [Only add max depth error when not in validation mode](https://github.com/HubSpot/jinjava/pull/310)
+* [Expand documentation factory with new fields](https://github.com/HubSpot/jinjava/pull/309)
+* [Allow ability to set a max recursion depth in config](https://github.com/HubSpot/jinjava/pull/308)
+
+### 2019-02-05 Version 2.5.0 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.5.0%7Cjar)) ###
+* [Render node in include tag in the same interpreter scopes](https://github.com/HubSpot/jinjava/pull/301)
+* [Fix expression resolver in include and from tag](https://github.com/HubSpot/jinjava/pull/300)
+* [Add root and log filters](https://github.com/HubSpot/jinjava/pull/299)
+* [Update expression resolver to return null instead of blank string](https://github.com/HubSpot/jinjava/pull/296)
+* [Expression resolver fixed in import tag](https://github.com/HubSpot/jinjava/pull/290)
+* [Error and documentation overhaul](https://github.com/HubSpot/jinjava/pull/289)
+* [Allow partial evalutation of templates](https://github.com/HubSpot/jinjava/pull/282)
+
+### 2019-02-05 Version 2.4.15 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.15%7Cjar)) ###
+* [Upgrade format filter to advanced filter](https://github.com/HubSpot/jinjava/pull/279)
+* [Allow null in string expression tests](https://github.com/HubSpot/jinjava/pull/278)
+* [Support negative indices in list slices](https://github.com/HubSpot/jinjava/pull/276)
+* [Add max string length configuration](https://github.com/HubSpot/jinjava/pull/275)
+* [Removed uses of `Throwables.propagate`](https://github.com/HubSpot/jinjava/pull/272)
+* [Allow tags to declare themselves safe for execution in validation mode](https://github.com/HubSpot/jinjava/pull/273)
+
+### 2019-01-08 Version 2.4.14 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.14%7Cjar)) ###
+* [Critical fix for elif statements](https://github.com/HubSpot/jinjava/pull/268)
+
+### 2019-01-07 Version 2.4.13 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.13%7Cjar)) ###
+* [Add support for expressions in selectattr and rejectattr](https://github.com/HubSpot/jinjava/pull/249)
+* [Add filters for datetime arithmetic](https://github.com/HubSpot/jinjava/pull/258)
+* [Add conversion to Java datetime format for strtotime](https://github.com/HubSpot/jinjava/pull/260)
+* [Add set theory filters such as union, intersect and difference](https://github.com/HubSpot/jinjava/pull/262)
+* [Add validation mode for extended syntax checking](https://github.com/HubSpot/jinjava/pull/264)
+* [Better handling for out of range values in ranage function](https://github.com/HubSpot/jinjava/pull/265)
+
+### 2018-11-21 Version 2.4.12 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.12%7Cjar)) ###
+* [Adds regex_replace filter](https://github.com/HubSpot/jinjava/pull/252)
+* [Removes some usage of Java 8 streams to fix a bytecode issue](https://github.com/HubSpot/jinjava/pull/254)
+
+### 2018-10-23 Version 2.4.11 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.11%7Cjar)) ###
+* [Add function for getting start of day](https://github.com/HubSpot/jinjava/pull/247)
+
+### 2018-10-19 Version 2.4.10 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.10%7Cjar)) ###
+* [Support negative array indices](https://github.com/HubSpot/jinjava/pull/245)
+
+### 2018-10-15 Version 2.4.9 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.9%7Cjar)) ###
+* [Add `ipaddr` filter to test valid IP addresses](https://github.com/HubSpot/jinjava/pull/237)
+* [Enable nested properties for `selectattr` and `rejectattr`](https://github.com/HubSpot/jinjava/pull/238)
+* [Add `do` tag to evaluate expressions without print](https://github.com/HubSpot/jinjava/pull/240)
+* [Add support for timezone conversions in `datetimeformat` filter](https://github.com/HubSpot/jinjava/pull/241)
+* [Add `prefix` function for `ipaddr` filter](https://github.com/HubSpot/jinjava/pull/243)
+
+### 2018-09-07 Version 2.4.8 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.8%7Cjar)) ###
+* [Bug fix for trunc division and power operations](https://github.com/HubSpot/jinjava/pull/234)
+
+### 2018-08-31 Version 2.4.7 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.7%7Cjar)) ###
+* [Do not allow returning objects of type Class](https://github.com/HubSpot/jinjava/pull/232)
+
+### 2018-08-29 Version 2.4.6 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.6%7Cjar)) ###
+
+* [Fix a memory leak in the global context](https://github.com/HubSpot/jinjava/pull/227)
+* [Do not allow calling getClass() on objects](https://github.com/HubSpot/jinjava/pull/230)
+
+### 2018-08-16 Version 2.4.5 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.5%7Cjar)) ###
+* [Limit the number errors](https://github.com/HubSpot/jinjava/pull/222)
+* [Detect fromTag cycle](https://github.com/HubSpot/jinjava/pull/221)
+* [Make jinjajava interpreter render timings trackable](https://github.com/HubSpot/jinjava/pull/219)
+* [Add raw object to group in groupby filter](https://github.com/HubSpot/jinjava/pull/218)
+* [Register json filters](https://github.com/HubSpot/jinjava/pull/216)
+* [Add filter to convert JSON string to Map](https://github.com/HubSpot/jinjava/pull/215)
+* [Add filter to convert objects to JSON](https://github.com/HubSpot/jinjava/pull/213)
+* [Deepen equalto expression test comparison](https://github.com/HubSpot/jinjava/pull/211)
+
+### 2018-07-10 Version 2.4.4 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.4%7Cjar)) ###
+* [Fix calling macros with kwargs](https://github.com/HubSpot/jinjava/pull/208)
+* [Limit the size of strings in TemplateErrors](https://github.com/HubSpot/jinjava/pull/209)
+
+### 2018-06-13 Version 2.4.3 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.3%7Cjar)) ###
+* [Wrap items in for loop with "PyIsh" equivalents](https://github.com/HubSpot/jinjava/pull/202)
+
+### 2018-06-01 Version 2.4.2 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.2%7Cjar)) ###
+* [Upgrade jsoup to address CVE](https://github.com/HubSpot/jinjava/pull/200)
+
+### 2018-04-22 Version 2.4.1 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.1%7Cjar)) ###
+
+* [Use `AdvancedFilter` for `selectattr` filter](https://github.com/HubSpot/jinjava/pull/183)
+* [Java 9 Support](https://github.com/HubSpot/jinjava/pull/186)
+* [Adds negation for expressions ("is not") ](https://github.com/HubSpot/jinjava/pull/187)
+* [Fix column numbers in syntax errors](https://github.com/HubSpot/jinjava/pull/188)
+* [When reporting errors, preserve casing](https://github.com/HubSpot/jinjava/pull/189)
+* [Populate `fieldName` in `TemplateSyntaxException`s](https://github.com/HubSpot/jinjava/pull/190)
+* [Reintroduce stricter parsing in int and float filters](https://github.com/HubSpot/jinjava/pull/191)
+
+### 2018-02-26 Version 2.4.0 ([Maven Central](https://search.maven.org/#artifactdetails%7Ccom.hubspot.jinjava%7Cjinjava%7C2.4.0%7Cjar)) ###
+
+* [Make int/float parsing locale aware](https://github.com/HubSpot/jinjava/pull/178)
+
+### 2018-02-09 Version 2.3.6 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.3.6%22)) ###
+
+* [Add more sequence expression tests](https://github.com/HubSpot/jinjava/pull/175)
+* [Don't put stack trace in the exception message](https://github.com/HubSpot/jinjava/pull/174)
+
+### 2018-01-26 Version 2.3.5 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.3.5%22)) ###
+
+* [Add new EscapeJinjavaFilter](https://github.com/HubSpot/jinjava/pull/168)
+
+### 2017-11-30 Version 2.3.4 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.3.4%22)) ###
+
+* [Preserve groupby order of elements](https://github.com/HubSpot/jinjava/pull/163)
+
+### 2017-11-16 Version 2.3.3 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.3.3%22)) ###
+
+* [always evaluate tags and control structures in nested expressions](https://github.com/HubSpot/jinjava/pull/161)
+
+### 2017-11-14 Version 2.3.2 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.3.2%22)) ###
+
+* [select filter now supports expression tests with arguments like 'equalto'](https://github.com/HubSpot/jinjava/pull/158)
+* [`TemplateError`s now include a scope depth](https://github.com/HubSpot/jinjava/pull/157)
+
+### 2017-10-30 Version 2.3.0 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.3.0%22)) ###
+
+* Add column numbers to error messages
+
+### 2017-10-24 Version 2.2.10 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.10%22)) ###
+
+* Use code of bad syntax as field name for `TemplateSyntaxException`s
+
+### 2017-08-31 Version 2.2.9 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.9%22)) ###
+
+* Apply resolved functions, expressions, and values to all [parents of Context object](https://github.com/HubSpot/jinjava/pull/147)
+
+### 2017-08-12 Version 2.2.8 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.8%22)) ###
+
+* Prevent recursion in Jinjava.
+* Fix failsOnUnknownTokens.
+* Add EscapeJson filter.
+
+### 2017-08-12 Version 2.2.7 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.7%22)) ###
+
+* Delegate toString() method on PyMap
+
+### 2017-08-03 Version 2.2.6 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.6%22)) ###
+
+* Limit size of output when [building strings](https://github.com/HubSpot/jinjava/pull/137)
+
+### 2017-08-02 Version 2.2.5 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.5%22)) ###
+
+* Enable configuration of a [non-random number generator](https://github.com/HubSpot/jinjava/pull/135) for tests
+
+### 2017-08-01 Version 2.2.4 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.4%22)) ###
+
+* Allow the use of filters including upper case letters: https://github.com/HubSpot/jinjava/pull/132
+* Add function to apply resolved strings from one Context object to another: https://github.com/HubSpot/jinjava/pull/133
+
+### 2017-07-21 Version 2.2.3 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.3%22)) ###
+
+* Make nested expressions configuration default to true.
+
+### 2017-07-19 Version 2.2.2 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.2%22)) ###
+
+* Disable interpretation of nested expressions with a configuration.
+
+### 2017-06-14 Version 2.2.1 ([Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.1%22)) ###
+
+* Includes field name in unknown tag error
+
+### 2017-05-12 Version 2.2.0 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.2.0%22)) ###
+
+* Removes `FileResourceLocator` as a default `ResourceLocator` to close a security hole. See the [README](README.md#template-loading) for details on how to reenable it.
+
+### 2017-04-11 Version 2.1.19 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.19%22)) ###
+
+* preserve order of named parameters
+
+### 2017-04-10 Version 2.1.18 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.18%22)) ###
+
+* fix bug when passing null argument to `filter`
+
+### 2017-03-31 Version 2.1.17 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.17%22)) ###
+
+* added config option to limit the rendered output size
+* added named parameter support for filters
+* added `type()` function
+
+### 2017-03-09 Version 2.1.16 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.16%22)) ###
+
+* disabled functions, filters and tags now add to template errors rather than throwing a fatal exception
+
+### 2017-01-18 Version 2.1.15 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.15%22)) ###
+
+* shaded JUEL
+* added `failOnUnknownTokens` mode which is similar to Jinja's StrictUndefined
+
+### 2016-11-18 Version 2.1.14 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.14%22)) ###
+
+* Enabled manual whitespace control by ending or closing tags with `{%-` or `-%}`
+* Fixed issue with passing arguments to `rejectattr`
+
+### Version 2.1.13 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.13%22)) ###
+
+* Added support for disabling specific functions, filters and tags
+
+### Version 2.1.12 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.12%22)) ###
+
+* Added ** and // operators
+* Fixed issue with passing arguments to expression tests
+
+### Version 2.1.11 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.11%22)) ###
+
+* Add additional specific error enums
+* Add escapeJS filter
+* Allow null expressions as target of replace filter
+
+### Version 2.1.10 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.10%22)) ###
+
+
+### Version 2.1.9 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.9%22)) ###
+
+* Exclude 'caller' from recursive macro check
+
+### Version 2.1.8 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.8%22)) ###
+
+* Add additional category information and error message tokens to TemplateError
+* Add range function
+* Update ListFilter to work with strings
+* Do not allow macros to be called recursively
+* Update checkstyle to 2.17
+
+### Version 2.1.7 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.7%22)) ###
+
+* Updated RawTag to not evaluate tags nested within it
+
+### Version 2.1.6 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.6%22)) ###
+
+* Added new bool filter to return boolean value from string
+* Added record of expressions and values evalulated
+
+### Version 2.1.5 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.5%22)) ###
+
+* Add support for java.util.Optional properties, nested properties in EL expressions
+
+### Version 2.1.4 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.4%22)) ###
+
+* fixed ArrayIndexOutOfBoundsException when importing template with no trailing newline
+
+### Version 2.1.3 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.3%22)) ###
+
+* Added two new expression tests for strings: "is string_startingwith" and "is string_containing"
+* Added support for multi-variable set in set tag (@amannm)
+* Added new detail dimension to TemplateError: ErrorItem
+
+### Version 2.1.2 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.2%22)) ###
+
+* Use resolved path value in include tag cycle detection
+* Store autoEscape flag in context outside of user-editable properties
+* Store superBlock reference in context outside of user-editable properties
+* make EL resolver read-only by default, expose as config parameter
+* restrict certain methods/properties in object expressions
+
+### Version 2.1.1 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.1%22)) ###
+
+* Better error messages for invalid assignment in expression
+* Allow for locale-based date formatting in StrftimeFormatter
+* Use configured locale for Functions.datetimeformat
+
+### Version 2.1.0 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.1.0%22)) ###
+
+* Refactored node render logic to return richer OutputNode instances, removing a need for a special intermediate string value in text output
+* Refactored cycle detection in import and include tags to remove use of special named vars in context
+* Fix bug to properly detect cycles in extends tag
+* Fix infinite recursion bug in resolveBlockStubs when block contains self-reference
+
+### Version 2.0.11 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.0.11%22)) ###
+
+* Renaming JinjavaInterpreter.renderString() to renderFlat() to better signify its purpose
+* Released build for jdk7 as version 2.0.11-java7
+
+### Version 2.0.10 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.0.10%22)) ###
+
+* minor performance enhancements
### Version 2.0.9 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.0.9%22)) ###
* update truncate_html filter to support preserving words by default, with an additional parameter to chop words at length
-* added unique filter to remove duplicate objects from a sequence
+* added unique filter to remove duplicate objects from a sequence
* add support for global trim_blocks, lstrip_blocks config settings
### Version 2.0.8 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%222.0.8%22)) ###
@@ -55,8 +579,8 @@
* 2.0.x requires JDK 8, as it contains some critical fixes to date formatting for certain languages (i.e. Finnish months)
* The 2.0.x release has some significant refactorings in the parsing code:
-** nests the .parse package under the existing .tree package
-** consolidating the token scanner logic, updating the node tree parser
+ ** nests the .parse package under the existing .tree package
+ ** consolidating the token scanner logic, updating the node tree parser
* future updates will be able to detect more specific template syntax errors than was previously possible.
@@ -111,4 +635,3 @@
### Version 1.0.0 ([Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.hubspot.jinjava%22%20AND%20v%3A%221.0.0%22)) ###
* Initial Public Release
-
diff --git a/README.md b/README.md
index cc9310ea9..e1285fa37 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,14 @@
-jinjava [](https://travis-ci.org/HubSpot/jinjava) [](https://maven-badges.herokuapp.com/maven-central/com.hubspot.jinjava/jinjava)
-=======
+# jinjava
+
+[](https://travis-ci.org/HubSpot/jinjava)
+[](https://codecov.io/github/HubSpot/jinjava)
+[](https://maven-badges.herokuapp.com/maven-central/com.hubspot.jinjava/jinjava)
+[](https://gitter.im/HubSpot/jinjava?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-Java-based template engine based on django template syntax, adapted to render jinja templates (at least the subset of jinja in use in HubSpot content). Currently used in production to render thousands of websites with hundreds of millions of page views per month on the [HubSpot COS](http://www.hubspot.com/products/sites).
+Java-based template engine based on django template syntax, adapted to render jinja templates (at least the subset of jinja in use in HubSpot content). Currently used in production to render thousands of websites with hundreds of millions of page views per month on the [HubSpot CMS](http://www.hubspot.com/products/sites).
+
*Note*: Requires Java >= 8. Originally forked from [jangod](https://code.google.com/p/jangod/).
Get it:
@@ -13,10 +18,22 @@ Get it:
com.hubspot.jinjavajinjava
- 2.0.7
+ { LATEST_VERSION }
```
+where LATEST_VERSION is the [latest version from CHANGES](CHANGES.md).
+
+or if you're stuck on java 7:
+```xml
+
+ com.hubspot.jinjava
+ jinjava
+ 2.0.11-java7
+
+```
+
+
Example usage:
--------------
@@ -38,10 +55,10 @@ String renderedTemplate = jinjava.render(template, context);
result:
```html
-
Hello, Handsome!
+
Hello, Jared!
```
-Voila! Hey, wait a minute...
+Voila!
Advanced Topics
---------------
@@ -53,14 +70,27 @@ Jinjava needs to know how to interpret template paths, so it can properly handle
{% extends "foo/bar/base.html" %}
```
-By default, it will load a ```FileLocator```; you will likely want to provide your own implementation of
-```ResourceLoader``` to hook into your application's template repository, and then tell jinjava about it:
+By default, it will load only a `ClasspathResourceLocator` which will allow loading from ANY file in the classpath inclusing class files. If you want to allow Jinjava to load any file from the
+file system, you can add a `FileResourceLocator`. Be aware the security risks of allowing user input to prevent a user
+from adding code such as `{% include '/etc/password' %}`.
+
+You will likely want to provide your own implementation of
+`ResourceLoader` to hook into your application's template repository, and then tell jinjava about it:
+
+```java
+JinjavaConfig config = JinjavaConfig.builder().build();
+
+Jinjava jinjava = new Jinjava(config);
+jinjava.setResourceLocator(new MyCustomResourceLocator());
+```
+
+To use more than one `ResourceLocator`, use a `CascadingResourceLocator`.
```java
-JinjavaConfig config = new JinjavaConfig();
-config.setResourceLocator(new MyCustomResourceLocator());
+JinjavaConfig config = JinjavaConfig.builder().build();
Jinjava jinjava = new Jinjava(config);
+jinjava.setResourceLocator(new MyCustomResourceLocator(), new FileResourceLocator());
```
### Custom tags, filters and functions
@@ -69,12 +99,15 @@ You can provide custom jinja tags, filters, and static functions to the template
```java
// define a custom tag implementing com.hubspot.jinjava.lib.Tag
-jinjava.getTagLibrary().addTag(new MyCustomTag());
+jinjava.getGlobalContext().registerTag(new MyCustomTag());
// define a custom filter implementing com.hubspot.jinjava.lib.Filter
-jinjava.getFilterLibrary().addFilter(new MyAwesomeFilter());
-// define a custom public static function (this one will bind to myfn.my_func('foo', 42))
-jinjava.getFunctionLibrary().addFunction(new ELFunctionDefinition("myfn", "my_func",
+jinjava.getGlobalContext().registerFilter(new MyAwesomeFilter());
+// define a custom public static function (this one will bind to myfn:my_func('foo', 42))
+jinjava.getGlobalContext().registerFunction(new ELFunctionDefinition("myfn", "my_func",
MyFuncsClass.class, "myFunc", String.class, Integer.class);
+
+// define any number of classes which extend Importable
+jinjava.getGlobalContext().registerClasses(Class extends Importable>... classes);
```
### See also
diff --git a/benchmark/README.md b/benchmark/README.md
deleted file mode 100644
index 1ae12810f..000000000
--- a/benchmark/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-Jinjava Benchmarks
-==================
-
-To Run:
-
- mvn clean package
- java -jar target/benchmarks.jar
-
-
diff --git a/benchmark/jinja2 b/benchmark/jinja2
deleted file mode 160000
index 85820fceb..000000000
--- a/benchmark/jinja2
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 85820fceb83569df62fa5e6b9b0f2f76b7c6a3cf
diff --git a/benchmark/liquid b/benchmark/liquid
deleted file mode 160000
index e2f8b28f5..000000000
--- a/benchmark/liquid
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit e2f8b28f56296ec767eb225be0ddf36f01016613
diff --git a/benchmark/pom.xml b/benchmark/pom.xml
deleted file mode 100644
index 70d78cc99..000000000
--- a/benchmark/pom.xml
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
- 4.0.0
-
- com.hubspot.content
- jinjava-benchmark
- 1.0
- jar
-
- JMH benchmark sample: Java
-
-
-
-
- 3.0
-
-
-
-
- com.hubspot.jinjava
- jinjava
- 2.0.8-SNAPSHOT
-
-
- commons-io
- commons-io
- 2.4
-
-
- org.slf4j
- slf4j-api
- 1.7.6
-
-
- ch.qos.logback
- logback-classic
- 1.1.2
-
-
- org.yaml
- snakeyaml
- 1.14
-
-
- de.sven-jacobs
- loremipsum
- 1.0
-
-
-
- org.openjdk.jmh
- jmh-core
- ${jmh.version}
-
-
- org.openjdk.jmh
- jmh-generator-annprocess
- ${jmh.version}
- provided
-
-
-
-
- UTF-8
- 1.10.3
- 1.8
- benchmarks
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.1
-
- ${javac.target}
- ${javac.target}
- ${javac.target}
-
-
-
- org.apache.maven.plugins
- maven-shade-plugin
- 2.2
-
-
- package
-
- shade
-
-
- ${uberjar.name}
-
-
- org.openjdk.jmh.Main
-
-
-
-
-
- *:*
-
- META-INF/*.SF
- META-INF/*.DSA
- META-INF/*.RSA
-
-
-
-
-
-
-
-
-
-
-
- maven-clean-plugin
- 2.5
-
-
- maven-deploy-plugin
- 2.8.1
-
-
- maven-install-plugin
- 2.5.1
-
-
- maven-jar-plugin
- 2.4
-
-
- maven-javadoc-plugin
- 2.9.1
-
-
- maven-resources-plugin
- 2.6
-
-
- maven-site-plugin
- 3.3
-
-
- maven-source-plugin
- 2.2.1
-
-
- maven-surefire-plugin
- 2.17
-
-
-
-
-
-
diff --git a/benchmark/resources/jinja/simple.jinja b/benchmark/resources/jinja/simple.jinja
deleted file mode 100644
index d60f09782..000000000
--- a/benchmark/resources/jinja/simple.jinja
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- {{page_title|e}}
-
-
-
-
{{page_title|e}}
-
-
- {% for href, caption in [('index.html', 'Index'), ('downloads.html', 'Downloads'), ('products.html', 'Products')] %}
-