Thread Starter
rh3sus
(@rh3sus)
I’ve updated to 2.9.1 and the problem still persists. Anyone?
I’m having the same problem. Hate it when “upgrades” break my website.
Think this may involve some of the deprecated things in /wp-includes/deprecated.php
Thread Starter
rh3sus
(@rh3sus)
Think this may involve some of the deprecated things in /wp-includes/deprecated.php
Not a bad idea, but I just read through that file and could not find any functions relating to filtering of content in this way.
I’m going to start grepping through all the files in 2.9.1 now to see what I can find that might relate to this.
Thread Starter
rh3sus
(@rh3sus)
I looked for the the_terms filter that I mentioned in my first post but that is only for displaying terms in a list so it doesn’t seem like it is related to term descriptions.
I think it might be something in wp-includes/default-filters.php
Thread Starter
rh3sus
(@rh3sus)
Ok, I have found it.
I added remove_filter( 'term_description', 'wp_kses_data' ); to my functions.php and images are now displayed again.
[stop reading here and just apply the above if you don’t want the geeky explanation]
Turns out (I think) that it has been changed so that wp_filter_kses is for filtering when you save the description in wp-admin and wp_kses_data has been added to filter on display of the page, so you will need both the remove_filter lines in your themes functions.php
The functions run through $allowedtags in wp-includes/kses.php so an alternative would be to add ‘img’, ‘src’ e.t.c to the allowed tags list, which would enable you still filter but let images and whatever allowed tags you add through. This explains why links still worked – ‘a’ and ‘href’ are allowed tags by default. While this would allow you to still filter other stuff in the post out, you would have to make the change to kses.php after every wordpress update.
Thread Starter
rh3sus
(@rh3sus)
quirk please confirm if this works for you too and i’ll mark the thread as resolved.