2bade67c04
A provider that leaks its end-of-sequence control token glued to the last MEDIA path (MEDIA:/x.png<|eos|>) made BasePlatformAdapter.extract_media return no media: neither MEDIA_TAG_CLEANUP_RE nor MEDIA_EXTENSIONLESS_TAG_RE accepts '<' as a path terminator (deliberately - widening the delimiter set reopens the glue classes #68773/#88038), so the file was silently dropped and the raw tag leaked into the chat. Recognise the one exact token at the shared normalization seam instead: _mask_media_scan_text blanks a terminal <|eos|> (offset-preserving) so the glued tag ends on whitespace for every scan - extraction, display strip and stream cleanup - across the known-extension, unknown-extension and extension-less branches; _deliverable_tag_spans deletes the sentinel with the tag it terminated. Not the exact token, not terminal, or inside a protected code/JSON span: byte-identical to before. Fixes #111046 Co-authored-by: Hukla <129692708+huklaa@users.noreply.github.com> Co-authored-by: joaomarcos <joaomarcosdias444@gmail.com>