Commit Graph
124 Commits
Author SHA1 Message Date
Brent Simmons e255f8638e Update DateParser comments to describe current behavior. 2026-12-03 09:02:04 -08:00
Brent Simmons f07651132a Read numeric offset after GMT or UTC as in GMT-0800 (JavaScript date strings, for instance). 2026-12-03 08:59:56 -08:00
Brent Simmons ec7ea1713f Fix bug where the year could be taken as the day. 2026-12-03 08:55:20 -08:00
Brent Simmons c51c13a3d4 Merge pull request #5588 from naitik0009/fix/5469-pubdate-month-first
Fix pubDate strings that parsed as January 1970 (#5469)
2026-12-03 08:52:08 -08:00
Brent Simmons 69acad4d06 Add special case system for placeholder images, so they’re not treated as thumbnails or as image to show in the article.
CI / SwiftLint (push) Canceled after 0s
CI / macOS Tests (push) Canceled after 0s
CI / iOS Simulator Tests (push) Canceled after 0s
2026-12-02 21:56:19 -08:00
Naitik Kumar Rauniyar 46aa0e351e Fix pubDate strings that parsed as January 1970 (#5469)
parsePubDate read dates in RFC 822 order (day, month, year). Feeds that
put the month first, such as "Nov 25, 2026" or "Fri, Nov 27 2026 02:07:36 PM",
found no month after the day and no year, so they fell back to January 1970.
New articles from those feeds were dated 1970 and marked read on arrival.

- Parse month-first dates when a month name precedes the day and the day
  is followed by the year.
- Apply AM/PM to the hour, and read a numeric offset attached to the time
  ("00:00:00-0800").
- Return nil instead of a 1970 date when the month or year is missing, so
  the existing dateArrived fallback is used.

Written with LLM assistance; reviewed and tested by me.
2026-11-28 18:54:50 +01: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 7b16af7698 Check image’s declared size before resolving its URLs. 2026-11-03 15:57:46 -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 13a73b54d2 Parse home page metadata in the background. Stop at the body tag. 2026-11-02 16:59:22 -08:00
Brent Simmons 2fd7f1b3cb Allow more rectangular thumbnails without going so far as to allow banners (which are probably ads). 2026-11-01 21:34:53 -08:00
Brent Simmons 1e822155b7 Fix comment. 2026-10-31 15:43:28 -07: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 ff8c16536a Stop allocating an array. 2026-10-30 21:52:41 -07:00
Brent Simmons dcc94fa185 Check for data: URLs without copying the entire value (which could be huge). 2026-10-30 21:43:12 -07:00
Brent Simmons 6d5d3c27a1 Pass HTML and URL to HTMLImageParser. 2026-10-30 21:41:57 -07:00
Brent Simmons 6a21487b00 Use just one tag name comparison function. 2026-10-30 21:39:48 -07:00
Brent Simmons e25987550a Rename isGravatarAvatar to isGravatar. 2026-10-30 21:20:46 -07:00
Brent Simmons 88104fb412 Pass parsed URL to isGravatarAvatar instead of URL string which then has to be parsed. 2026-10-30 18:19:06 -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 1f418a17c9 Add HTMLImageParser. 2026-10-25 11:44:45 -07:00
Brent Simmons 0a637e3fc3 Add HTMLImage type. 2026-10-25 11:23:34 -07:00
Brent Simmons 986a8fa04a Edit comment. 2026-10-25 11:23:22 -07:00
Brent Simmons 14d9898943 Add stopParsing function. 2026-10-25 11:21:34 -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 d3d52a72ef Parse enclosures and articles images from Reader API accounts. 2026-10-24 10:53:14 -07:00
Brent Simmons 7858ea8b61 Parse and store Feedbin image, thumbnail, and enclosure. 2026-10-23 20:54:40 -07:00
Brent Simmons 96f307911d Add support for thumbnails. 2026-10-23 13:18:44 -07:00
Brent Simmons 405c82260b Add thumbnailURL. 2026-10-23 12:09:43 -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