Pre-emptive: every CI job is ubuntu-latest, so none of these tests fail today.
No assertion is weakened - each replacement is equivalent or stricter on Linux.
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 954835278
Merge https://github.com/google/adk-python/pull/6118
## Summary
- Replace regular expression-based code block extraction with a simple and safe string-find based search. This avoids exponential backtracking (ReDoS) when processing long or repeating inputs with missing trailing delimiters.
- Add unit tests to verify standard behavior and test against ReDoS vulnerability.
Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 933834549