trsteel88/TrsteelCkeditorBundle — pull request #32 by tyler-sommer (2013-01-16 00:26:40+00:00)
Title: Base path config breaks asset url rewrite

Before the last PR #31 was merged, the JS variable was set using `/bundles/trsteelckeditor/` and the twig asset() call using `bundles/trsteelckeditor/` -- Note the lack of leading slash on the latter.

With the new functionality, the path contains the leading slash, is assumed by `asset()` as absolute, and is not rewritten properly.

This PR strips any leading slash during container construction when setting parameters, and then assumes there is no leading slash in the widget template -- fixing the BC break and still supporting the new functionality.

Note: It does not, however, cover the use-case where the user actually wants an absolute base path. But that wasn't supported before, either, since CKEDITOR_BASEPATH gets appended to the application's base path in the javascript of the widget template.