Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
290 stars 205 forks source link

Change esc_html to strip_tags for displayName in _format_author_data function in class-coauthors-endpoint.php #938

Open thedanielcho opened 1 year ago

thedanielcho commented 1 year ago

Description

This is a fix for https://github.com/Automattic/Co-Authors-Plus/issues/937#issue-1759165795 where I switched out the esc_html function call for strip_tags for the displayName to fix an apostrophe display issue on the post-edit page.

Should include any special considerations, decisions, and links to relevant GitHub issues.

Please don't include internal or private links

Deploy Notes

Are there any new dependencies added that should be taken into account when deploying to WordPress.org?

Steps to Test

Outline the steps to test and verify the PR here.

Example:

  1. Check out PR.
  2. Do stuff
GaryJones commented 1 year ago

Thanks, Daniel.

I'm not convinced that the escaping should be done before the REST response is sent back since there's no idea of what context that escaping should be for - will it be for HTML, an attribute, XML, or something else? Needs an investigation.