Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter torbzy

    (@torbzy)

    <p>Join our 8-day immersive course led by renowned Permaculture Expert Rakesh Rootsman Rak. Whether you’re new to permaculture or a seasoned designer, this is your chance to enhance your skills and contribute to helping make a real community forest garden space at Crops Not Shops.? See below for all the detailed info!!!</p>
    <p><img class="emoji" role="img" draggable="false" src="https://s.w.org/images/core/emoji/15.0.3/svg/1f5d3.svg" alt="???" /> *WHEN:* June 25th - July 2nd, 9am - 5pm daily.<br />
    <img class="emoji" role="img" draggable="false" src="https://s.w.org/images/core/emoji/15.0.3/svg/1f4cd.svg" alt="??" /> *WHERE:* Crops Not Shops, Glastonbury, UK.<br />
    <img class="emoji" role="img" draggable="false" src="https://s.w.org/images/core/emoji/15.0.3/svg/26fa.svg" alt="??" /> Camping accommodation <br />
    <img class="emoji" role="img" draggable="false" src="https://s.w.org/images/core/emoji/15.0.3/svg/1faf6.svg" alt="??" /> Suggested contributions for all 8 days is between £200 and £500 (ideal contribution £350)</p>
    <p><img class="emoji" role="img" draggable="false" src="https://s.w.org/images/core/emoji/15.0.3/svg/270c-1f3fc.svg" alt="???" />The 2 day introduction to forest gardening can be attended as a separate course to learn how to design your own low maintenance biodiverse rich food forest. Contributions from £50 and £200 for the 2 days £120</p>
    <p><img class="emoji" role="img" draggable="false" src="https://s.w.org/images/core/emoji/15.0.3/svg/261d-1f3fd.svg" alt="???" />Or for single days between from 27th June to 2nd July contributions of £30 to £90 per day, with an ideal of £60</p>
    <p>==== REGISTRATION ====<br />
    To register for this course, please fill in the following form. If you have any difficulty or have any questions please feel free to contact Rakesh<br />
    <a >https://tinyurl.com/CnSFG2024</a></p>
    <p>#foodforest #growyourown #growyourownfood #organicgardening #bethechange</p>

    This HTML and use of icons breaks publishing, updating or draft

    I copied and pasted your code into a Custom HTML block in a post, and I can save as draft, publish, and update the post — without any issues. Here’s the published post:

    https://nostalgicbirds.s2-tastewp.com/2024/05/29/html-test/

    I don’t have an environment to test this in, but this looks like a possible solution, from here: https://stackoverflow.com/a/75888275/2694371

    Adding this code in functions.php fixed it for me:

    add_filter( 'wp_insert_post_data', function( $data, $postarr ) {
    if ( ! empty( $data['post_content'] ) ) {
        $data['post_content'] = wp_encode_emoji( $data['post_content'] );
    }
    return $data;
    }, 99, 2 );
    

    Actually, looking at this more, this thread seems like the place to start. It’s likely an issue with the character encoding in the database being mismatched from what WP is sending. The solution will be to either A) convert the database to the expected encoding, or B) tell WordPress to expect a different encoding, and shim the post content with the above code.

    https://github.com/WordPress/gutenberg/issues/19552#issuecomment-1758798993

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘This HTML and use of icons breaks publishing, updating or draft’ is closed to new replies.