- ๐ฆ๐นAustria drunken monkey Vienna, Austria
Thanks for reporting this issue and already providing a patch โ very nice work!
Thanks, especially, that you even provided a test already! The test, however, is slightly off, as itโs actually not the excerpt thatโs making problems (as we already strip all tags from the tags before creating the excerpt) but fields highlighting.
I therefore adapted the test slightly to better tell whatโs actually being tested.The problem itself seems to come from excessive backtracking, and therefore seems only slightly related to invalid HTML. Therefore, I think weโre better off trying to fix the regex to not need as much backtracking anymore. Please see/test/review my attached revision and tell me what you think.
Anyways, thanks again for your nice work on this! The last submitted patch, 8: 3264239-8--pcre_error_highlighting--tests_only.patch, failed testing. View results โ
-
drunken monkey โ
committed ee56453a on 8.x-1.x
Issue #3264239 by drunken monkey, DieterHolvoet: Fixed the regular...
-
drunken monkey โ
committed ee56453a on 8.x-1.x
- Status changed to Fixed
over 1 year ago 7:36am 19 March 2023 - ๐ฆ๐นAustria drunken monkey Vienna, Austria
Good to hear, thanks for reporting back!
Committed. Thanks again! Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
over 1 year ago 12:23pm 29 June 2023 - ๐ฉ๐ฐDenmark bonsaipuppy
I might be misinterpreting the use of the preg_split, but as far as i understand from the source code it's supposed to throw away any html tags, opening and closing ones, to just leave the text inside those to highlight in.
then the regex in the patch won't work properly for nodes with attributes having quoted values.
check it out on regex101: https://regex101.com/r/w0OSao/1