Please or Register to create posts and topics.

Allow HTML in user profile bio?

Hello,

I was wondering, how would it be possible to allow HTML tags in user profile bios on my site? It’s a private site and all the members are close friends, so I’m not worried about anyone adding malicious tags to their profile. I have included wordpress plugins to my site to allow html on author profiles, but when I look at my Asgaros profile, it all still just shows as one big block of text, html tags exposed and unused. How do I fix this?

Thanks for your time,

Kaqurei

Hello @kaqurei

I cannot add an option for this to the forum configuration because by default WordPress filters HTML-tags in the user-bio anyway. If you want to allow HTML-output, you directly have to modify the file wp-content/plugins/asgaros-forum/includes/forum-profile.php. Look for the following line:

$cellValue = trim(esc_html($userData->description));

Replace it with:

$cellValue = trim($userData->description);

Alternatively I recommend you and your users to use signatures instead. For signatures there are options which allow you to control which HTML-tags can be used.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Thank you! That worked perfect.

Asgaros has reacted to this post.
Asgaros

Uh oh, after I updated Asgaros to Version 1.10.0, my users’ profiles went back to being filtered out for HTML. I went back to the profile file and applied the same fix as before, but it doesn’t seem to be working now.

 

Help?

@kaqurei

The code still works fine. Please check again that you modified the correct line (should be 255) and saved the file correctly.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Ah, I just needed to clear my site’s cache. It’s fixed. Thanks! 🙂

Asgaros has reacted to this post.
Asgaros