Skip to content

Biographical Info field on contributors profile is double-encoded #352

Open
@paulschreiber

Description

@paulschreiber

The Biographical Info (cap-description) field is double encoded. It generates HTML like this:

<label for="cap-description">Biographical Info</label></th><td>
<textarea style="width:300px;margin-bottom:6px;" name="cap-description">&amp;amp;Aaron is
here.</textarea>

In class-coauthors-guest-authors.php, in get_guest_author_fields(), we have this code:

array(
        'key'      => 'description',
        'label'    => __( 'Biographical Info', 'co-authors-plus' ),
        'group'    => 'about',
        'sanitize_function' => 'wp_filter_post_kses',
    ),

By calling wp_filter_post_kses instead of the default filter (sanitize_text_field), we end up with the double encoding.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions