Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #63426, comment 2


Ignore:
Timestamp:
05/12/2025 01:24:42 PM (6 months ago)
Author:
smahjoob
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63426, comment 2

    v3 v4  
    55
    66In a clean install of WordPress trunk (r60231, May 11 2025) with Twenty Twenty-Five active and no plugins, load a PHP script or post that outputs:
    7 
    8 html
    9 Copy
    10 Edit
    117<iframe srcdoc="<body></body>"></iframe>
    128Pass that HTML through wptexturize(), e.g. via:
    13 
    14 php
    15 Copy
    16 Edit
    179echo wptexturize( '<iframe srcdoc="<body></body>"></iframe>' );
    1810🐞 Observe that the output becomes:
    19 
    20 html
    21 Copy
    22 Edit
    2311<iframe srcdoc="<body></body>&#8221; ></iframe>
    2412—the closing quote of srcdoc is replaced with &#8221;, corrupting the attribute.
     
    2917✅ wptexturize() leaves the srcdoc attribute intact, producing:
    3018
    31 html
    32 Copy
    33 Edit
    3419<iframe srcdoc="<body></body>"></iframe>
    3520When reproducing the bug (no patch applied):