'Checks #1366 error condition.
When adding/editing a plugin whose icon_src() method returns a URL
containing an hyphen, the hyphen is escaped by django escapejs resulting
in a incorrect URL'

@override_settings(CMS_PERMISSION=False)
def test_nested_plugin_escapejs(self):

    ex = Example1(char_1='one', char_2='two', char_3='tree', char_4='four')
    ex.save()
    ph1 = ex.placeholder
    test_plugin = add_plugin(ph1, u'EmptyPlugin', u'en')
    test_plugin.save()
    endpoint = self.get_change_plugin_uri(test_plugin, container=Example1)
    response = self.client.post(endpoint, {})
    self.assertContains(response, 'CMS.API.Helpers.onPluginSave')
