[wp-meta] [Making WordPress.org] #5875: Allow XML configuration examples in WP core handbook

Making WordPress.org noreply at wordpress.org
Thu Aug 26 06:07:39 UTC 2021


#5875: Allow XML configuration examples in WP core handbook
--------------------------------------+---------------------
 Reporter:  SergeyBiryukov            |       Owner:  (none)
     Type:  defect                    |      Status:  new
 Priority:  normal                    |   Milestone:
Component:  Make (Get Involved) / P2  |  Resolution:
 Keywords:                            |
--------------------------------------+---------------------

Comment (by dd32):

 Ha.. Okay so editing on the front end, and I got the `<php>` stripped out.

 Yep, it's Kses stripping it out there, the
 [https://github.com/Automattic/syntaxhighlighter Syntax Highlight plugin]
 has some special handling in it to encode things before kses I believe or
 maybe
 [https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html
 /wp-content/themes/pub/wporg-breathe/functions.php#L251 in our custom
 theme hack for it].. or maybe something else entirely..

 It could also be related to the fact the visual editor is broken here, as
 the problem content ''should'' be HTML encoded, but when you edit it via
 the front end, the it's converted from html encoded to plain html, and so
 kses is correct in stripping it out.

 Having this code block within the `<li>` is problematic regardless though,
 as it's improperly nested for the purposes of Gutenberg parsing.

 To make it work properly, I've converted this block from a List block,
 into a HTML block, and then converted the inline Syntax block into a
 regular code block. It can now be edited properly, both on front-end and
 within Gutenberg without issue. I've corrected the list elements too,
 Gutenberg no longer complains that the syntax is broken..

 Regardless, there's a need to figure out why the visual editor is not
 working, which is beyond me right this moment. Really we should get
 Gutenberg into the front-end editor for o2 instead, to make this a better
 experience, since chances are future edits to the page (and others) are
 likely to cause these problems. I ran into some other recently added HTML
 that was also invalid, so there's a fair bit of human error happening
 right now.

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5875#comment:6>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list