[wp-trac] [WordPress Trac] #55996: the get_the_block_template_html call all the same functions as the the_conent filter so they are run twice
WordPress Trac
noreply at wordpress.org
Thu Feb 23 22:25:23 UTC 2023
#55996: the get_the_block_template_html call all the same functions as the
the_conent filter so they are run twice
-------------------------------------------------+-------------------------
Reporter: pbearne | Owner: flixos90
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.3
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests needs- | Focuses:
testing changes-requested | performance
-------------------------------------------------+-------------------------
Comment (by manfcarlo):
Replying to [comment:32 flixos90]:
> I personally think the approach of removing and re-adding filters is a
hacky workaround, not a proper fix. What we should work towards is to
actually avoid double content parsing, as in record content that was
already parsed and ensure that it is not parsed again.
I agree with you on this. I think there were some promising ideas from
your implementation, but the fatal flaw was doing the recording within the
string itself instead of some external store.
What about patching the functions themselves (`wptexturize`,
`shortcode_unautop`, `wp_filter_content_tags`, `do_shortcode`,
`convert_smilies`) to skip the sections that have already been processed
by post content blocks? This seems to fix all of the issues that have been
raised so far, and in the event that it conflicts with a plugin for
whatever reason, it would just fall back to the current behaviour instead
of causing total disappearance of content.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55996#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list