Make WordPress Core


Ignore:
Timestamp:
07/07/2026 09:44:41 PM (3 months ago)
Author:
adamsilverstein
Message:

Editor: Strip inline note markers from rendered block output.

Inline (partial-text) notes anchor to a text selection within a block via an in-content <mark class="wp-note" data-id="N"> marker. The marker stays in the raw post_content (and the REST raw view, revisions, and exports) so the editor can re-attach the note on reload, but the public front end should not expose note metadata.

See related Gutenberg pull request: ​https://github.com/WordPress/gutenberg/pull/78218.

Props mukesh27, dmsnell, westonruter.
Fixes #65482.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r62652 r62658  
    790790add_filter( 'render_block', 'wp_render_typography_support', 10, 2 );
    791791
     792// Inline note markers.
     793add_filter( 'render_block', 'wp_strip_inline_note_markers' );
     794
    792795// User preferences.
    793796add_action( 'init', 'wp_register_persisted_preferences_meta' );
Note: See TracChangeset for help on using the changeset viewer.