Automattic / themes

Free WordPress themes made by Automattic for WordPress.org and WordPress.com.
https://themeshaper.com
GNU General Public License v2.0
890 stars 354 forks source link

Cubic: Extra <p> is added when using HTML code in the Classic block #3266

Open poojashetty18 opened 3 years ago

poojashetty18 commented 3 years ago

Steps to replicate

  1. Add a Classic block and select Edit as HTML
  2. User shared the below code they tried:
<div style='float:left;padding:30px 0;'><a title='Fujifilm X-T10 | Fujifilm
18-55mm f2.8-4@18mm (27mm equiv) | 1/70s | f8 | ISO 400 | +0.3ev'
href='https://www.atmtxphoto.com/Portfolio/California-Gallery/i-8fD5Kz9/A'><img
src='https://photos.smugmug.com/Blog/Creative-Commons-2/i-XQgbWVW/0/fa6361bb/O/anaheim-california-2019-epic-man-made-landscape.jpg'
alt='Epic Man-made Landscape, Disney California Adventure - Anaheim, California'
/></a>
<h3 class='sub' style='font-size:12px;'>Epic Man-made Landscape, Disney
California Adventure - Anaheim, California</h3>
</div>

Result

Adds an additional space after the image

Annotation on 2021-02-15 at 13-21-58

Expected

No spaces should be present. I could also recreate this on my test site and user mentioned it never happened before and it was just updated

serabi commented 3 years ago

Provided the user with this CSS as a temporary fix:

.entry-content p:empty:before {
    display: none; 
}