Automattic / Automattic/jetpack

Testimonials: paragraph tags added to Testimonial page content in customizer

Open
#2,492 4 comments 0 reactions 0 assignees View on GitHub
[Feature] Custom Content Types [Pri] Low Bug
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:

![screen shot 2015-08-04 at 3 25 14 pm](https://cloud.githubusercontent.com/assets/426388/9061581/0a4585a6-3abd-11e5-8d5c-e392ca78ddc7.png)
- 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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.