Skip to content

fix(ai): strip control characters before extraction (#366)#368

Open
yetval wants to merge 1 commit into
D4Vinci:devfrom
yetval:fix/366-control-characters
Open

fix(ai): strip control characters before extraction (#366)#368
yetval wants to merge 1 commit into
D4Vinci:devfrom
yetval:fix/366-control-characters

Conversation

@yetval

@yetval yetval commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #366.

Pages with control chars like U+0008 crash the MCP get/fetch tools. This strips those chars (keeping tabs/newlines) so extraction succeeds.

Before: ValueError: All strings must be XML compatible...
After:  HTTP 200, content='HelloWorld'

Verified by @chcodex on the live JFinal pages. Includes a regression test.

@yetval

yetval commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Code Quality failure is pre-existing/environmental, seems like it's upstream in the Scrapy module:

scrapling/integrations/scrapy.py:15 - error: Import "scrapy.http" could not be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant