WordPress / theme-review-action

Other
31 stars 10 forks source link

Fatal errors are not properly detected when in html attributes. #63

Closed dd32 closed 2 years ago

dd32 commented 3 years ago

For example, take this theme run: https://themes.trac.wordpress.org/ticket/106344#comment:6

The fatal error occured within a HTML attribute (See echo esc_attr_() within https://themes.trac.wordpress.org/changeset/155597) and so wasn't matched by the fatal extraction from the DOM.

I guess this means that more might need to be done to either close the attribute before outputting errors or doing some kind of string parsing on the DOM rather than simply relying upon the DOM

StevenDufresne commented 2 years ago

Agreed. The regular expression isn't very flexible at the moment:

https://github.com/WordPress/theme-review-action/blob/64554690d3e355c34530111cdeaa1d766b8cae11/actions/ui-check/tests/utils/helpers.js#L7