Edge case: https://www.example.com/a_(aaaaaaaaaaaaaaaaa) with 17 chars inside parentheses results in a PREG_BACKTRACK_LIMIT_ERROR
Similar strings result in a successful match
https://www.example.com/a_(aaaaaaaaaaaaaaaa) with 16 chars inside parentheses https://www.example.com/a_(aaaaaaaaaaaaaaaaa)b with 17 chars inside parentheses together with trailing character
Tests have been added which address the now solved edge case together with its sibling cases.
Fixes issue https://github.com/misd-service-development/php-linkify/issues/14 by applying atomic-grouping to prevent catastrophic backtracking.
Edge case:
https://www.example.com/a_(aaaaaaaaaaaaaaaaa)
with 17 chars inside parentheses results in aPREG_BACKTRACK_LIMIT_ERROR
Similar strings result in a successful match
https://www.example.com/a_(aaaaaaaaaaaaaaaa)
with 16 chars inside parentheseshttps://www.example.com/a_(aaaaaaaaaaaaaaaaa)b
with 17 chars inside parentheses together with trailing characterTests have been added which address the now solved edge case together with its sibling cases.
The following fork already contains the fix: https://github.com/lode/php-linkify/