Closed jfmaeck closed 9 years ago
The original greedy regex had problems recoginizing dynamically inserted scripts:
Example Source Code:
... <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="/vendor/jquery/jquery.min.js"><\/script>')</script> ...
Example output before patch (greedy regex):
array(2) { array(2) { [0]=> string(59) "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" [1]=> string(40) "/vendor/jquery/jquery.min.js"><\/script>" }
Example output after patch (non-greedy regex):
array(2) { [0]=> string(59) "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" [1]=> string(28) "/vendor/jquery/jquery.min.js" }
yeah look good. thank you!
The original greedy regex had problems recoginizing dynamically inserted scripts:
Example Source Code:
Example output before patch (greedy regex):
Example output after patch (non-greedy regex):