Project

General

Profile

Actions

Bug #18227

closed

Snippet with variables does not reset @vars after they finish in unsafe mode

Added by Marek Hulán almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

If we have a template such as

<%= snippet 'test', :variables => { :var => 'value' }
<%= @var %>

the @var would be set by the template which can cause problems later. This only happens in unsafe mode where we use the same context for each rendering. We need to split local context variables and reset them after this local context is rendered.


Related issues 1 (0 open1 closed)

Related to Foreman - Feature #18143: Snippet macros should support passing variablesClosedMarek Hulán01/18/2017Actions
Actions

Also available in: Atom PDF