Open webaddicto opened 7 years ago
This malformed href= is not correctly parsed:
<a href=/1233fffdc0d1537bb0046c316ca0385c967a906f>
On Glype it is parsed correctly using this regex:
#(?><[A-Z0-9]{1,15})(?>\s+[^>\s]+)*?\s*(?>(href|src|background|poster)\s*=(?!\\\\)\s*)(?>([\\\'"])?)((?(2)(?(?<=")[^"]{1,2048}|[^\\\']{1,2048})|[^ >]{1,2048}))(?(2)\\2|)#i
Tested here: http://www.phpliveregex.com/p/j63
This malformed href= is not correctly parsed:
<a href=/1233fffdc0d1537bb0046c316ca0385c967a906f>
On Glype it is parsed correctly using this regex:
#(?><[A-Z0-9]{1,15})(?>\s+[^>\s]+)*?\s*(?>(href|src|background|poster)\s*=(?!\\\\)\s*)(?>([\\\'"])?)((?(2)(?(?<=")[^"]{1,2048}|[^\\\']{1,2048})|[^ >]{1,2048}))(?(2)\\2|)#i
Tested here: http://www.phpliveregex.com/p/j63