In the old version of wordpress 1.5x my author description would display html, however, in 2.0 the author profiles no longer parse html. Any suggestions?
In the old version of wordpress 1.5x my author description would display html, however, in 2.0 the author profiles no longer parse html. Any suggestions?
This has been reported on Trac but likely won't be fixed until at least WordPress 2.1:
Anyone know a fix for this so I don't need to wait?
Does anyone know a fix for this?
To quote Trac http://trac.wordpress.org/ticket/2272
"...we don't allow HTML in the profile pages."
well that answers that...
I just added a Page for the first time and was not able to add a picture to it although the clickable link behind it did appear (but I didn't click to see if it worked, it was blue and underlined though so...)
at least now I know why the picture wouldn't stay (because the box did try to open lol)
always ready for a new version :-)
So what is the ETA on version 2.1?
This was a feature that was very important to one of my sites.
Does anyone have a mod to allow this to work?
I sure hope so.
I wish instead of disabling it there was an option to have it display html code rendered or not rendered. Weird.
please disregard my msg above, was definitely my cache or host, HTML did post as of me checking again just a minute ago, sorry about the confusion
but I was talking about an added PAGE to my WP blog, not necessarily the Author profile page... I should've just stayed out of the thread
Please note that at patch that fixes this has been suggested at:
http://trac.wordpress.org/ticket/2272
OK I'm a code tard, how can I use that patch to fix this problem? Where should I enter that into that file, etc?
I'm confused by the patch. Does anybody know if this patch trims html from the profile or if it renders html?
Any help/clarification here?
?
Here's how I fixed the problem in my author.php - template file:
<?phpif(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;echo html_entity_decode($curauth->description);
?>
It's actually only the last line that's interresting. The 'html_entity_decode' function in PHP converts entities to plain text, thereby allowing HTML to be used in the author description field.
Romme, that looks very promising. I'm trying to integrate it into my template-functions-author.php file.
Is your example replacing something that already exists? Or did you just drop that into the end of the document somehow? It didn't work when I tried it, that's why I ask.
Anybody ever come up with a definitive answer on this topic?
I modified wp-includes/default-filters.php as follows; I believe it has the effect of formatting a user's profile description just like a post (but ignoring smilies):
Remove the line add_filter('pre_user_description', 'wp_filter_kses');
Add the lines:
add_filter('pre_user_description', 'wp_filter_post_kses');
add_filter('pre_user_description', 'wptexturize');
add_filter('pre_user_description', 'wpautop');
add_filter('pre_user_description', 'convert_chars');
add_filter('pre_user_description', 'balanceTags', 50);
The wp_filter_post_kses filter removes HTML prohibited in posts---it is less restrictive than wp_filter_kses.
Omigosh, that worked beautifully. Thanks so much!!!!!!!!!!!!!!!!!!!!!!!!
This topic has been closed to new replies.