Skip to Content Skip to Menu

CB stripping HTML code - turn off validation?

4 years 8 months ago #317155 by JagaTelesin
I'm attempting to do some very simple lightboxing of images from the CB gallery, inside a profile blog entry. But even using No Editor and pasting in the code manually, when I save the blog, CB strips the code out again.

Here is a snippet of the code before and after the blog is saved:

Before:
Code:
<p><a data-rokbox href="/images/bagallery/original/myimage.jpg" data-rokbox-generate-thumbnail>_auto_generated_thumb_</a></p>

After:
Code:
<p><a>_auto_generated_thumb_</a></p>

I've attempted to add tags excluded from filtering in the CB Configuration->User Profile area, but either I don't have the tags listed correctly, or that isn't what's stripping them.

Any help would be appreciated. It would be nice to be able to turn off HTML validation entirely for CB when using an Editor that includes it's own (TinyMCE, JCE, etc).

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
4 years 8 months ago #317164 by krileon
Replied by krileon on topic CB stripping HTML code - turn off validation?
It shouldn't be stripping the href attribute. There's no functionality to turn off the processing as it's for security purposes. You can only exclude tags from filtering, but not attributes. Try adding your link without the data attributes. Have added a feature ticket to review adding support for excluding attributes from filtering.

forge.joomlapolis.com/issues/7882


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: JagaTelesin

Please Log in or Create an account to join the conversation.

4 years 8 months ago #317184 by JagaTelesin
Replied by JagaTelesin on topic CB stripping HTML code - turn off validation?
Thanks for looking at it krileon. If I built the a tag with just the href, it stays in fine. Apparently when it detects unapproved attributes it "cleans" the entire a tag including the href. Weird, but it is what it is. Perhaps due to having one in front of the href and one behind it? That's just how the RokBox button builds the code.

I'll be hard to lightbox anything in a blog without it, so I'm glad you added it to a review list. Definitely a desired feature!

Please Log in or Create an account to join the conversation.

4 years 8 months ago #317191 by JagaTelesin
Replied by JagaTelesin on topic CB stripping HTML code - turn off validation?
Wanted to keep you guys in the loop on where we were with this, so that you don't spin your wheels too much on the ProfileBook Blogs.

We shifted gears and switched to using core CB Blogs, and told it to use Joomla's blogging in articles instead of Internal (CB) blogs. That keeps all the attributes intact when an article is saved. But the lightboxing of a Gallery image is still a problem due to the URL masking that's going on with both thumbnails and full images in the gallery.

I posted about it over here , in case you want to give it a read. Cheers.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum