inpsyde / MultilingualPress-Yoast-SEO-Sync

This is a simple add-on for the MultilingualPress plugin to synchronize the post metadata of the Yoast SEO plugin between translated posts.
GNU General Public License v2.0
7 stars 3 forks source link

Yoast plugin add rich text editor in Categories but MultilingualPress strips the html tags #11

Closed Dinamiko closed 4 years ago

Dinamiko commented 4 years ago

Description Yoast plugin adds advanced editor to term description, in MLP metabox, the term description field value is sanitized using sanitize_textarea_field resulting in HTML tags removed in remote term descriptions when term is saved.

Steps to reproduce the issue

What should happen? H1 tag in description should exist.

What happened instead? H1 tag in description does not exist.

Proposed solution In order to prevent the above, we can use wp_kses_post which also sanitizes but allows basic HTML tags. In order to do so, in src/multilingualpress/TranslationUi/Term/MetaboxFields.php in FIELD_DESCRIPTION metabox field, replace sanitize_textarea_field to wp_kses_post.

Dinamiko commented 4 years ago

Closing issue, it needs to be addressed in MultilingualPress plugin.