Allow HTML in user profile bio?
Quote from Kaqurei on August 22, 2018, 7:36 pmHello,
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,
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
Quote from Asgaros on August 23, 2018, 9:47 amHello @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.
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.
Quote from Kaqurei on September 4, 2018, 5:39 amUh 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?
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?
Quote from Asgaros on September 4, 2018, 8:57 am@kaqurei
The code still works fine. Please check again that you modified the correct line (should be 255) and saved the file correctly.
The code still works fine. Please check again that you modified the correct line (should be 255) and saved the file correctly.