- Issue created by @prudloff
When calling Typogrify::dash()
on a long repeated string, it can cause catastrophic backtracking. The steps to find matches increase exponentially and it can cause bad performances or even make preg_replace()
fail entirely.
Call Typogrify::dash()
on the string in the attached file.
preg_replace()
fails and returns null.
I am not sure what the correct solution is.
This article may help: https://www.regular-expressions.info/catastrophic.html
Active
1.3
Code