Automattic / Automattic/co-authors-plus
Biographical Info field on contributors profile is double-encoded
- Dominant language
- PHP
- Stars
- 322
- Forks
- 216
- Avg merge
- 7h 50m
- Merged PRs (30d)
- 65
Description
The Biographical Info (cap-description) field is double encoded. It generates HTML like this:
```
Biographical Info
&Aaron is
here.
```
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.
Contributor guide
Research direction
Start in class-coauthors-guest-authors.php at get_guest_author_fields(), focusing on the description field and its sanitize_function. Reproduce the generated Biographical Info textarea HTML and compare it with the expected single-encoded value. Done means the field no longer produces double-encoded content without changing the intended sanitization behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100