houseofdeadleg Posted July 13, 2015 Share Posted July 13, 2015 I'm not sure if this is the correct section to post this, but anyway, I've run into a small issue with adding links in CKeditor. I need to apply a class and rel attribute to some links. I've added the appropriate classes, etc in the ProcessPageEditLink module via the insert link dialogue, and the class can now be applied easily. I also tested with the title and target attributes and they also can be applied, however the rel attribute keeps getting stripped out. Any ideas why this might be? Link to comment Share on other sites More sharing options...
pwired Posted July 13, 2015 Share Posted July 13, 2015 You can switch off 'ACF' in your CK Editor settings which will stop the editor stripping any markupIf you just want to allow 'class' then go to CK Editor settings for your field and find 'Extra Allowed content'and enter in there the following:*(*)This should allow you to put classes without them being stripped. Link to comment Share on other sites More sharing options...
houseofdeadleg Posted July 13, 2015 Author Share Posted July 13, 2015 @pwired I tried turning off ACF, didn't help. The class can be applied with no problems, as can the target and title attributes from the same dialogue box, only the rel attribute gets stripped, even though it's applied the same way. To clarify, it gets applied as it should (as shown in the preview at the bottom of the dialogue), but when the page is saved it gets taken out. Link to comment Share on other sites More sharing options...
Macrura Posted July 13, 2015 Share Posted July 13, 2015 i ran into something like this, maybe it's the html purifier? (can't test right now); after you close the dialog, if you view source, is the rel attribute still there? Link to comment Share on other sites More sharing options...
houseofdeadleg Posted July 14, 2015 Author Share Posted July 14, 2015 @macrura I think I did try turning off the HTML purifer as well with no success, but I'll try that again when I get chance to be sure. Yeah, after closing the dialogue the rel's in the source. Save the page and go back to check and it's gone. Link to comment Share on other sites More sharing options...
houseofdeadleg Posted July 14, 2015 Author Share Posted July 14, 2015 @macrura just tried turning HTML purifier off and that worked, the rel attribute doesnt get stripped out. Thought Id already tried that but must have missed it out. Link to comment Share on other sites More sharing options...
a-ok Posted February 25, 2017 Share Posted February 25, 2017 On 14/07/2015 at 10:01 AM, houseofdeadleg said: @macrura just tried turning HTML purifier off and that worked, the rel attribute doesnt get stripped out. Thought Id already tried that but must have missed it out. I guess rel links should always be allowed... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now