* TF-5099 Prevent StringConvert from corrupting plain entries matching Base64 and URL patterns
- Only decode Base64 strings when decoded output contains '@' and raw input does not
- Wrap Uri.decodeComponent in try-catch to preserve addresses with literal '%'
- Add regression tests in string_convert_test.dart
* refactor: extract _decodeInputIfNeeded to reduce cognitive complexity
* TF-5099 Cover percent and base64 address extraction with more tests
* Update core/lib/utils/string_convert.dart
Co-authored-by: Dat Vu <datx1995@gmail.com>
* refactor: flatten URL decode condition and add regression test for percent-escaped addresses
* TF-5099 Cover invalid percent and partial-encode address pins
* TF-5099 Pin behavior for mixed and quoted partially encoded addresses
---------
Co-authored-by: Dat H. Pham <dphamhoang@linagora.com>
Co-authored-by: Dat Vu <datx1995@gmail.com>
Co-authored-by: dab246 <80730648+dab246@users.noreply.github.com>
Before sending input to the LLM, we clean the composer input to
remove html tags. We relied on regex that we not complete enough and
could be bypassed easily. So let's use the html parser available in
Dart instead.
I also added some tests.