Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Push/pop context stack to avoid polluting context of other placeholders

  • Loading branch information...
commit 417d78eeb01ad59d0df8013730a114c140c12ba3 1 parent 55f8103
@hedberg hedberg authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 cms/plugin_rendering.py
View
4 cms/plugin_rendering.py
@@ -123,7 +123,8 @@ def render_placeholder(placeholder, context_to_copy):
given context, and returns a string containing the rendered output.
"""
from cms.plugins.utils import get_plugins
- context = copy.copy(context_to_copy)
+ context = copy.copy(context_to_copy)
+ context.push()
request = context['request']
plugins = [plugin for plugin in get_plugins(request, placeholder)]
page = get_page_from_placeholder_if_exists(placeholder)
@@ -161,6 +162,7 @@ def render_placeholder(placeholder, context_to_copy):
content = "".join(c)
if edit:
content = render_placeholder_toolbar(placeholder, context, content)
+ context.pop()
return content
def render_placeholder_toolbar(placeholder, context, content):
Please sign in to comment.
Something went wrong with that request. Please try again.