Skip to content

Conversation

@jasmith-hs
Copy link
Contributor

Currently when using |render filter and encountering a DeferredValue as part of the interpreter.renderFlat, a DeferredToken will be created and the output will be correct, but it will lose the indication that there was a deferred value.

Similar to #920

{% set foo = "Hi {{ search_term|escape }}" %}
{{ foo|render|escape_jinjava }}

Currently results in:

Hi {{ filter:escape.filter(search_term, ____int3rpr3t3r____) }}

Because RenderFilter did not have any indication that the filter chain could not keep going. This is fixes as a DeferredInvocationResollutionException is now thrown. This results in the rendered value getting stored in a temporary value and substituted for the |render filter.

I also replaced some usages of DeferredParsingException with DeferredValueException in this PR because those usages didn't do anything beneficial and removing that logic makes the code ever so slightly less complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants