Safe content here that should be included in the extracted text output.
More safe content that should also appear in the final output.
""" Security tests for content fetcher. Tests for XSS prevention, malicious content handling, and safe URL processing. """ from unittest.mock import MagicMock, patch from local_deep_research.research_library.downloaders.html import HTMLDownloader from local_deep_research.content_fetcher import ContentFetcher from local_deep_research.content_fetcher.url_classifier import ( URLClassifier, URLType, ) class TestHTMLDownloaderSecurity: """Security tests for HTML downloader.""" @patch( "local_deep_research.research_library.downloaders.html.HTMLDownloader._fetch_html" ) def test_script_tags_removed(self, mock_fetch): """Test that script tags are removed from content.""" malicious_html = """
Safe content here that should be included in the extracted text output.
More safe content that should also appear in the final output.
More article content for the reader.