Automattic / Automattic/jetpack
Testimonials: paragraph tags added to Testimonial page content in customizer
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
Steps to reproduce:
1. Go to Settings > Writing, and enable the Testimonials CPT.
2. Go to Appearance > Themes, and enable a theme like Sela, that supports Testimonials.
3. Go to Appearance > Customize
4. Click on Testimonials, and enter a test testimonial page content value.
5. Save your changes.
6. Reload the page and access the Testimonials panel again:

- Why do we apply `the_content` to the testimonial page content in the customizer?
https://github.com/Automattic/jetpack/blob/master/modules/custom-post-types/testimonial.php#L716
- Should we remove `wpautop` when applying `the_content`, to avoid such issues?
Contributor guide
Research direction
Read modules/custom-post-types/testimonial.php around line 716, then reproduce the issue through the Testimonials customizer flow described in the report. Compare the customizer's use of the_content and wpautop, and verify that reloading the panel no longer adds unwanted paragraph tags to saved testimonial content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100