You mean it has to do with the plugin? If you disable the plugin, put html in the description and save the term, it is still there?
The only thing I could imagine where it happens is in the plugin line 227:
if ( isset($_POST['description']) && ($_POST['description'] != '') ) $term['description'] = stripslashes(sanitize_text_field($_POST['description']));
You could try to remove the sanitize_text_field( ) and see if that helps.
Thread Starter
Ahni
(@ahni)
Yes, it’s definitely a plugin issue. As soon as I disabled it, all my html was preserved as per usual.
I tried removing sanitize_text_field( ) like you suggested, specifically
sanitize_text_field($_POST[‘description’])
Unfortunately, when I saved tried saving a term, it deleted the entire description!
sorry, my suggestion was somewhat ambiguous. Actually I meant only to take out the function, but leave the inner bit $_POST[‘description’] .
That line would thus become:
if ( isset($_POST['description']) && ($_POST['description'] != '') ) $term['description'] = stripslashes($_POST['description']);
I tested the change here and it seems to make a difference.
I did not know that html is allowed in the description but it indeed makes sense.
Thread Starter
Ahni
(@ahni)
Hooray, it worked!! I owe you one, big time, for making this plugin and for the awesome support. Thank you!
You are welcome! And thank you for testing!