rh3sus
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: Enable HTML in term descriptionsOk 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.
Forum: Everything else WordPress
In reply to: Enable HTML in term descriptionsI’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.
Forum: Everything else WordPress
In reply to: Enable HTML in term descriptionsThe resolution for this can be found in this other thread : http://ww.wp.xz.cn/support/topic/348400?replies=8
Forum: Themes and Templates
In reply to: Enable XHTML in term descriptionsquirk please confirm if this works for you too and i’ll mark the thread as resolved.
Forum: Themes and Templates
In reply to: Enable XHTML in term descriptionsOk, 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.
Forum: Themes and Templates
In reply to: Enable XHTML in term descriptionsI looked for the
the_termsfilter 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
Forum: Themes and Templates
In reply to: Enable XHTML in term descriptionsThink 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.Forum: Themes and Templates
In reply to: Enable XHTML in term descriptionsI’ve updated to 2.9.1 and the problem still persists. Anyone?
Forum: Themes and Templates
In reply to: weird alignmentThat 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.