Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #58765


Ignore:
Timestamp:
07/08/2023 03:25:45 PM (15 months ago)
Author:
sabernhardt
Comment:

Hi and thanks for the report!

innerText would not work with HTML entities, but I did not find any in the 93 existing translations (see "Other locales" tab). The translator comment could let people know to avoid them for any future translations.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58765

    • Property Keywords has-patch added; changes-requested removed
    • Property Version changed from 6.2.2 to 5.8
  • Ticket #58765 – Description

    initial v2  
    99If I do it, I get the following error message in the browser Console:
    1010“This document requires TrustedHTML assignment”
    11 because “innerHTML” is used in this script: the_block_template_skip_link()
     11because “innerHTML” is used in this script: `the_block_template_skip_link()`
    1212
    1313Impact
     
    1717
    1818I have done that on my own homepage:
    19 remove_action( 'wp_footer', 'the_block_template_skip_link' );
     19`remove_action( 'wp_footer', 'the_block_template_skip_link' );`
    2020
    21 and then I have added the skiplink again, replacing "innerHTML" with "innerTEXT" in the script.
     21and then I have added the skiplink again, replacing "innerHTML" with "innerText" in the script.
    2222
    2323The code works (used theme: Twenty Twenty-Three).