Skip to content

Commit

Permalink
Reader: fix highlighted text formatting (#98149)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcangelini authored Jan 15, 2025
1 parent 36346bb commit 7e59ffa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/lib/post-normalizer/rule-content-remove-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ export default function removeContentStyles( post, dom ) {
throw new Error( 'this transform must be used as part of withContentDOM' );
}

// Allow the markup for galleries, Instagram, and Twitter. Styling will be allowed on elements that match this selector.
// Styling will be allowed on elements that match this selector.
const allowedMarkupSelector =
// Inline highlighted text
'mark.has-inline-color, ' +
// Gallery
'.gallery, .gallery *, .gallery-row, .gallery-row *, .gallery-group, .gallery-group *, ' +
// Instagram
'blockquote[class^="instagram-"], blockquote[class^="instagram-"] *, ' +
// Twitter
'blockquote[class^="twitter-"], blockquote[class^="twitter-"] *';

// remove most style attributes
Expand Down

0 comments on commit 7e59ffa

Please sign in to comment.