[wp-trac] [WordPress Trac] #64527: Fix missing whitespace before troubleshooting link in fatal error handler
WordPress Trac
noreply at wordpress.org
Mon Jan 19 18:53:25 UTC 2026
#64527: Fix missing whitespace before troubleshooting link in fatal error handler
---------------------------------------+------------------------------
Reporter: Presskopp | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch has-screenshots | Focuses:
---------------------------------------+------------------------------
Changes (by sabernhardt):
* component: General => Upgrade/Install
Comment:
The [https://github.com/WordPress/wordpress-
develop/blob/cfa06b16d210995793f0cee826169e0a986ad28f/src/js/_enqueues/wp/updates.js#L2383-L2384
updates script] removes HTML from the error message, and that message is
escaped later.
The escaped error message is inserted into the list table `<div>` created
in [https://github.com/WordPress/wordpress-
develop/blob/cfa06b16d210995793f0cee826169e0a986ad28f/src/wp-
admin/includes/update.php#L514 wp_plugin_update_row()].
I tried ignoring the `a` element, which shows the opening link tag markup
but not the paragraphs.
{{{error = error.replace( /<[\/b-z][^<>]*>/gi, '' );}}}
Resulting HTML:
{{{<div class="update-message notice inline notice-alt notice-
error"><p>Update failed: There has been a critical error on this website.
Please check your site admin email inbox for instructions. If you continue
to have problems, please try the <a
href="https://wordpress.org/support/forums/">support forums.<a
href="https://wordpress.org/documentation/article/faq-
troubleshooting/">Learn more about troubleshooting
WordPress.</p></div>}}}
Displays:
> `Update failed: There has been a critical error on this website. Please
check your site admin email inbox for instructions. If you continue to
have problems, please try the <a
href="https://wordpress.org/support/forums/">support forums.<a
href="https://wordpress.org/documentation/article/faq-
troubleshooting/">Learn more about troubleshooting WordPress.`
----
I also tried replacing tags with a space, but I am not convinced that
would be a good change either.
{{{error = error.replace( /<[\/a-z][^<>]*>/gi, ' ' );}}}
Resulting HTML:
{{{<div class="update-message notice inline notice-alt notice-
error"><p>Update failed: There has been a critical error on this website.
Please check your site admin email inbox for instructions. If you continue
to have problems, please try the support forums . Learn more about
troubleshooting WordPress. </p></div>}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64527#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list