Commit Graph
69 Commits
Author SHA1 Message Date
Brent Simmons 81345183cd Add test to make sure an Atom xhtml title handles CDATA section properly. 2026-11-11 20:42:59 -08:00
Brent Simmons 39cd96839e Handle Guardian image enclosures that don’t use a media:group and that differ only by ?width=. Pick the widest one. 2026-11-09 08:42:06 -08:00
Brent Simmons 9e0c28fcce Use an item’s only Gravatar as its only author’s avatar, even when its title is the username ("halmueller" instead of "Hal Mueller," for instance). 2026-11-08 22:16:07 -08:00
Brent Simmons d8417db7d5 Skip enclosure images that are the same as the feed image (as with Letters from an American), so they don’t become redundant timeline thumbnails or primary images. 2026-11-08 21:56:55 -08:00
Brent Simmons fcbc491180 Rename forNameCaseInsensitive to forCaseInsensitiveName. 2026-11-06 10:33:49 -08:00
Brent Simmons d49c25abf9 Pass article base URL to image attribute inserter as URL, matching HTMLImageParser. 2026-11-03 16:04:05 -08:00
Brent Simmons 98dccfe5dc Decode entities in title and textarea, so link from SVG title is correctly decoded. 2026-11-03 15:48:01 -08:00
Brent Simmons 3fb7f9fe46 Fix decorative banner test for the current aspect-ratio limit. 2026-11-03 14:17:14 -08:00
Brent Simmons 43f885e5a0 Return URL strings from HTMLImageParser and delete HTMLImage, which was unused outside tests. 2026-10-31 15:36:24 -07:00
Brent Simmons b00dce516d Skip images hidden by hidden attribute or style none. Trying to avoid tracking pixels as thumbnails. 2026-10-31 11:53:30 -07:00
Brent Simmons 8955619c40 Stop rejecting photos with "track" or "open" in name since they could be legitimate. 2026-10-31 11:50:41 -07:00
Brent Simmons 15a43c3350 Fix srcset parser bug. 2026-10-31 11:42:12 -07:00
Brent Simmons fcd5d295bd Choose narrowest srcset candidate at least 1200 px wide instead of the largest candidate, to cut down on bandwidth use. 2026-10-31 11:39:53 -07:00
Brent Simmons aa900631ae Find thumbnails in data-lazy-srcset, data-srcset, and data-original. 2026-10-30 22:30:13 -07:00
Brent Simmons 25e94de5c5 Test that relative image URL is skipped when baseURL is nil. 2026-10-30 21:56:30 -07:00
Brent Simmons 6d5d3c27a1 Pass HTML and URL to HTMLImageParser. 2026-10-30 21:41:57 -07:00
Brent Simmons 377531b40c Reject images with tracking names. 2026-10-29 10:06:53 -07:00
Brent Simmons 617598c7aa Treat textarea, title, xmp, noembded as raw text in HTMLScanner. 2026-10-29 09:21:12 -07:00
Brent Simmons c1b8c44c7e Use the largest srcset image over src (which is often a placeholder). 2026-10-29 08:43:10 -07:00
Brent Simmons 92059c4c10 Create HTMLImageAttributeInserter which adds attributes to img tags so we can add a local src for an image where we have a local version. 2026-10-27 13:54:50 -07:00
Brent Simmons 98b440b83a Save multiple thumbnail URLs per article in case one fails or is too small etc. 2026-10-27 11:18:29 -07:00
Brent Simmons 0663332828 Try each image in HTML until one is significant. 2026-10-27 11:14:13 -07:00
Brent Simmons 41d9b754b3 Increase the aspect ratio limit some. 2026-10-26 19:31:52 -07:00
Brent Simmons 098ee21d49 Add HTMLImageParserTests. 2026-10-25 11:45:36 -07:00
Brent Simmons 473a94bb06 Store and display attachments in feed order. 2026-10-24 11:58:06 -07:00
Brent Simmons 17b9a5b543 Use WordPress Gravatar media:content enclosure as author avatar URL instead of as image enclosure. 2026-10-24 11:48:48 -07:00
Brent Simmons 96f307911d Add support for thumbnails. 2026-10-23 13:18:44 -07:00
Brent Simmons 876e0a0068 Parse itunes:image as article image. Show thumbnail in article view when there's no other visual enclosures (unless that image is already in the content). 2026-10-23 10:33:22 -07:00
Brent Simmons 77075a1883 Use media:description when no other content or summary is available. 2026-10-23 09:56:56 -07:00
Brent Simmons 9ac6221022 Parse Media RSS in Atom. Share more Media RSS handling between RSS and Atom parsers. 2026-10-22 21:54:15 -07:00
Brent Simmons 4a842f8ef3 Parse Media RSS in RSS feeds. Merge attachments that refer to the same thing, so we get all the available metadata. 2026-10-22 21:49:57 -07:00
Brent Simmons df20c6cc1c Add width, height, and medium properties to ParsedAttachment. Make JSON Feed mime_type optional. 2026-10-22 21:05:06 -07:00
Brent Simmons 60bfa4e209 Ignore textinput sections in RSS feeds. (Which we see only with the Slashdot feed, but there may be others of course). Fixes #5459. 2026-10-02 09:56:12 -07:00
Brent Simmons d1eaf76763 Fix HTMLScanner to allow slashes in unquoted attribute values, which fixes feed discovery bugs (among other things). 2026-08-01 18:13:19 -07:00
Brent Simmons 1d54877be2 Support Atom xml:base — resolve relative URLs. Fixes #5088. 2026-07-28 10:10:49 -07:00
Brent Simmons 3a948b7556 Decode ‍ and ‌ entities. 2026-07-04 17:16:10 -07:00
Brent Simmons 8c02fb3ba4 Fix case where a title (or other tag) doesn’t have a prefix but is inside a namespaced section (<s:variant> for instance). Fixes #4422. 2026-05-26 19:45:34 -07:00
Brent Simmons 820dd504f1 Fix SwiftLint issues. 2026-05-22 10:01:54 -07:00
Brent Simmons 3b9347ce05 Make RSParser depend on RSCore and use a single md5String implementation (in RSCore). Make Swift Testing work with RSCore. 2026-04-24 10:23:34 -07:00
Brent Simmons d6eb8df7d0 Parse Atom summary. 2026-04-24 08:56:21 -07:00
Brent Simmons dfaa1d9c6e Add performance tests for the new String.decodingHTMLEntities. 2026-04-22 09:52:40 -07:00
Brent Simmons 3d4c502101 Create and use TestHelpers.swift. 2026-04-20 12:16:02 -07:00
Brent Simmons 75c7d7da0d Organize RSParserTests so structure matches module structure. 2026-04-20 12:00:42 -07:00
Brent Simmons 82406cc823 Delete RSParserObjC. Update references. Add tests. 2026-04-20 11:50:23 -07:00
Brent Simmons 89f009ced0 Use new HTMLMetadata and HTMLLink parsers. 2026-04-20 10:58:15 -07:00
Brent Simmons 76e1c07b2f Add parser benchmarks code. 2026-04-19 20:50:53 -07:00
Brent Simmons 90099fcf0f Update tests. 2026-04-19 20:43:54 -07:00
Brent Simmons 5949478e48 Add XMLNamespaceContext and tests. 2026-04-19 14:20:59 -07:00
Brent Simmons 082e3f2975 Add XMLAttributes and tests. 2026-04-19 14:15:59 -07:00
Brent Simmons a0e3016b2e Add XMLEntities and tests. 2026-04-19 13:58:25 -07:00