Making WordPress.org

Changeset 12567


Ignore:
Timestamp:
05/02/2023 03:24:28 AM (3 years ago)
Author:
dd32
Message:

Support Forums: Blocks: Some browsers are inserting emoji with trailing </img>, which while unexpected can be handled here easily.

See #6964.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-blocks.php

    r12412 r12567  
    310310                // Replace all img.emoji with the alt text.
    311311                $content = preg_replace(
    312                         '~<img[^>]+class="emoji"[^>]+alt="(.*?)"+[^>]+>~i',
     312                        '~<img[^>]+class="emoji"[^>]+alt="(.*?)"+[^>]+>(</img>)?~iu',
    313313                        '$1',
    314314                        $content
Note: See TracChangeset for help on using the changeset viewer.