Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter rh3sus

    (@rh3sus)

    Ok then, I think your concern is a fair one.

    As I said in the other thread, the best/most secure way to do this would be to add the required html elements into $allowed tags and leaving the filter in place; but this would be lost on each wordpress upgrade. I might consider making a plugin to do this in future but my priority initially was in getting the functionality of the site back.

    Thread Starter rh3sus

    (@rh3sus)

    I’m not sure I follow you.
    The way I see it, filling in term/tag descriptions is a higher role level action by default (I forget which exactly but a reasonably high role level is required).
    Therefore in removing this filter, I am stopping filtering of what administrators(/editors) edit in to the term description.
    I’m not really worried about admins SQL injecting 😉

    That was how I thought this worked anyway, please correct me if I am wrong.

    Thread Starter rh3sus

    (@rh3sus)

    The resolution for this can be found in this other thread : http://ww.wp.xz.cn/support/topic/348400?replies=8

    Thread Starter rh3sus

    (@rh3sus)

    quirk please confirm if this works for you too and i’ll mark the thread as resolved.

    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)

    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)

    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’ve updated to 2.9.1 and the problem still persists. Anyone?

    That particular heading is in a <div> while the others are not.

    i.e. :

    <div style="text-align: left;"><span style="text-decoration: underline;"><strong>Other expectations</strong></span></div>

    while

    <p><span style="text-decoration: underline;"><strong>Essential Expectations</strong></span></p>

    so edit the page to remove the <div>, or if it really needs to be in a <div> you can add margin-left:15px; to the element style to line it up with the rest.

Viewing 9 replies - 1 through 9 (of 9 total)