divio/django-cms — Issue #1159: Overzealous JS breaks plugin icons with hyphens
Author: evildmp
Created: 2012-01-31 22:49:10+00:00
State: open

This is the problem: in the editor, you save a plugin with an icon whose path contains a hyphen. The editor turns the hyphens into unicode: \u002D.

Naturally, the url and therefore the icon then no longer work.

I think the problem was introduced in commit 71965f845a38078b36da1a491a06d8202c744cc3, in line 27 of cms/templates/admin/cms/page/plugin_forms_ok.html:

{% javascript_string %}{{ icon }}{% end_javascript_string %}

because simply removing the {% javascript_string %} fixes the immediate problem behaviour. (That's not a fix, because simply doing that means that the EditPluginPopup window doesn't close when the plugin is Saved.)