ACF Advanced Content Filtering - broken?

Recommended Posts

What I did

  1. edit the default 'body' field (textarea, ckeditor)
  2. field > body > input: "enable ACF" checked "yes" by default
  3. field > body > input: "extra allowed content" ...

The instructions indicate "Example: img[alt,!src,width,height]" in order to enable a tag with attributes you want to allow through the filtering.


I wrote the above expecting that now i would be able to class my a tags in the editor, maybe make one a "button" style or whatever. However, this doesn't actually work as it seems Extra Allowed Content doesn't actually do what it indicates.

I've tried a dozen different variations and after googling here and seeing some responses in other threads, I think this should be addressed. The box is a nice way to enable a few attributes the user might want to allow for clients or themselves, I don't see why one would require making a module or going above and beyond the tools and text areas already provided in order to simply allow a few attributes.  I could turn ACF Off entirely, but that doesn't really address the problem: I want to filter the input for clients but still configure some tweaks that I deem would enhance and not break the site.

Simply: it's there, it's nice to have, should work right, but it doesn't seem to. Help?



Share this post

Link to post
Share on other sites

Adding a 'class' attribute to an element is different to adding other attributes, you add either allowed class names or a '*' wildcard within parenthesis.

// Allow *any* class name

// Allow only specific class names

// In your case (assuming any class name) it would be:

Here's the CK Editor docs for Allowed Content rules:



  • Like 1

Share this post

Link to post
Share on other sites

OHHHHHHHHHHHhhhhhhhhhhhhhhhhhh. God, I feel dumb but honestly I was totally perplexed by that. 

Thank you so much LMD. I will try it out and see.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By noelboss
      Short description of the issue
      Since PW 3.0.88: When I try to retrive a croped file using the api filesManager() and it's basename, I get the original version instead of the croped variation.
      Expected behaviour
      Looking up a variation using the path and filesManager should return the variation file.
       $page->filesManager->getFile("/path/to/filebasename.400x400.jpg"); // $file->basename > filebasename.400x400.jpg Actual behavior
      The variation is returned.
       $page->filesManager->getFile("/path/to/filebasename.400x400.jpg"); // $file->basename > filebasename.jpg  
      » Is this a bug or do I miss something here?
      dump($page->filesManager->path.$input->get->filename('f')); $file = $page->filesManager->getFile($page->filesManager->path.$input->get->filename('f')); dump($file); dump($page->filesManager->path.$file->basename); Output:
      "/home/ubuntu/workspace/www/site/assets/files/-1579/colin-rex-434063.400x400.jpg" (79) ProcessWire\Pageimage #796f pageimages protected => ProcessWire\Pageimages #d195 original protected => ProcessWire\Pageimage #796f { RECURSION } variations private => null imageInfo private => array (2) width => 0 height => 0 error protected => "" pagefiles protected => ProcessWire\Pageimages #d195 data protected => array (6) basename => "colin-rex-434063.jpg" (20) description => "" tags => "" formatted => true modified => 1516025386 created => 1516025386 useFuel protected => true _instanceNum private => 870 localHooks protected => array () trackChanges private => 2 changes private => array (1) formatted => array (1) 0 => null _notices protected => array (3) errors => null warnings => null messages => null _wire protected => ProcessWire\ProcessWire #28d0 in .../www/site/templates/app/utils/download.php:29
      "/home/ubuntu/workspace/www/site/assets/files/-1579/colin-rex-434063.jpg" (71)
    • By Cloud8888
      Greetings from germany,

      i develop a shop for a customer and wanted to give them the opportunity to find products without any images so they could easily fill this empty sites.
      The problem is, that this images are placed inside a repeater.
      So the structure for the repeater field is:
      bild (where 1 image can be placed)
      bildrecht (another repeater for placing the copyright  text)

      But here comes my problem.
      I designed a selector that should show me all sites where the repeater count is 0.
      Like :
      But it also shows me results, where the repeater count is still 1 or even greater.
      If i save one of these bad results, the selector works fine.

      Is there a way around it ?
      I use pw 3.0.76.

    • By benbyf
      One of my clients found a bug when viewing the PW admin on chrome using windows - the admin tab nav doesn't appear, they could only see the tool icon either though they were a superadmin user. When viewed on Edge the tabs where present. The site is running on PW 3.0.62 with the default admin.
      I was screen sharing with my client when we found the bug, I don't actually have anyway to test this and see what's wrong myself as I dont run windows and dont currently have a cross broswer testing suite. Could someone please look into it briefly?
    • By dreerr
      In PW 3.0.80 I've experienced a bug when using multiple Page Ref fields. The Select button keeps fading in and out again. I've made a video to illustrate the problem. Any ideas how to solve this?
      video showing the error: PageRefError.mov
      greetings, d.
    • By theoretic
      Hi everyone! And thanks again for a perfect product.
      It appears there's a small bug in the implementation of fieldset. If we rename a field of type FieldsetTabOpen, the auto-created field of type FieldsetTabClose won't auto-rename. E.g. if we create a fieldset called "noises", two fields will be created -- "noise" (type: FieldsetTabOpen) and "noise_END" (type: FieldsetTabClose). And when we later rename the field "noise" to "acoustics", the field "noise_END" still keeps its name. The auto-generated field description will also remain unchanged.
      This is only a minor bug, but removing it could make the Processwire even better. Thanks in advance!