Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playing nicely with radius tags #1

Open
mrdavidbacon opened this issue Jul 1, 2009 · 1 comment
Open

Playing nicely with radius tags #1

mrdavidbacon opened this issue Jul 1, 2009 · 1 comment

Comments

@mrdavidbacon
Copy link

I realize this is a known issue, but it would be a huge benefit to our client (www.switzer.com.au) if they could use the Fckeditor on pages with radius tags in them.

At the moment not only does the editor corrupt internal links on the page, it freezes on the Fckeditor so that it's not possible to switch back to the raw source.

It would really make radiant easier to use for a lot of users out there if this issue could be resolved.

@HollowClown
Copy link

This is an issue in several different browsers, but most notably under IE and variants. A large part of the issue is that, under the default FCK configuration, radius tags are not protected. This means that when a page including radius tags is loaded or saved, the data on the page gets parsed through a XML DOM tree. Depending on the browser and XML parser that you're using, this can lead to everything from tag corruption to javascript execution crashes. This is most notable when using deep radiant tags, like <r:children:each>/r:children:each, since most XML parsers won't correctly translate that into <r:children><r:each>/r:each/r:children.

A good workaround is to add this line to /public/javascripts/fckconfig.js :

FCKConfig.ProtectedSource.Add( /</?r:[^>]*>/gi );

This will cause radius tags (ie, any tag beginning with <r: or </r: ) to be classed as protected under FCKeditor -- they won't appear in the editor window, nor will they be passed to the XML parser. Radius tags can still be viewed and modified by turning off the FCKeditor filter.

I've verified that this works under FireFox, Chrome, and IE8. Has anyone else had any luck?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants