miniflux / v2

Minimalist and opinionated feed reader
https://miniflux.app
Apache License 2.0
6.76k stars 713 forks source link

Title outermost text not used as fallback when type="xhtml" set in title property but no child div #1401

Closed lf94 closed 2 years ago

lf94 commented 2 years ago

You can see this with this feed: https://spectrum.library.concordia.ca/cgi/search/archive/advanced/export_library_Atom.xml?dataset=archive&screen=Search&_action_export=1&output=Atom&exp=0

fguillot commented 2 years ago

I don't see any items in the linked feed.

<?xml version="1.0" encoding="utf-8" ?>
<feed
    xmlns="http://www.w3.org/2005/Atom"
    xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:sword="http://purl.org/net/sword/"
>
<title>Spectrum: Concordia University Research Repository: No conditions. Results ordered -Date Deposited. </title>
<link rel="alternate" href="https://spectrum.library.concordia.ca/"/>
<updated>2022-03-31T04:03:39Z</updated>
<generator uri="http://www.eprints.org/" version="3.4.3">EPrints</generator>
<logo>https://spectrum.library.concordia.ca/images/spectrumlogo.png</logo>
<id>https://spectrum.library.concordia.ca/</id>

</feed>

Also, you should specify the version of Miniflux.

lf94 commented 2 years ago

I guess part of the url got cut; here it is in full:

https://spectrum.library.concordia.ca/cgi/search/archive/advanced/export_library_Atom.xml?dataset=archive&screen=Search&_action_export=1&output=Atom&exp=0%7C1%7C-date%2Fcreators_name%2Ftitle%7Carchive%7C-%7Cdivisions%3Adivisions%3AANY%3AEQ%3Adep_apphumansci+dep_comms+dep_economics+dep_philosophy+dep_psychology+dep_csse%7Ctype%3Atype%3AANY%3AEQ%3Aarticle+conference_item+thesis+graduate_projects%7C-%7Ceprint_status%3Aeprint_status%3AANY%3AEQ%3Aarchive%7Cmetadata_visibility%3Ametadata_visibility%3AANY%3AEQ%3Ashow&n=

It's miniflux v2 :) Thank you for replying so fast!

fguillot commented 2 years ago

It's miniflux v2 :)

The exact version number is required. All issues in this bug tracker are related to the version 2.

Unfortunately, this feed is malformed and it's not valid. You can verify with the W3C validator: https://validator.w3.org/feed/check.cgi

image

Example of entry title:

<title type="xhtml">Expectations and acculturation: Further unpacking of adjustment mechanisms within the Russian-speaking community in Montreal</title>

It should be:

<title type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Expectations and acculturation: Further unpacking of adjustment mechanisms within the Russian-speaking community in Montreal</div></title>

See Atom specs: https://datatracker.ietf.org/doc/html/rfc4287#section-3.1.1.3

If the value of "type" is "xhtml", the content of the Text construct MUST be a single XHTML div element

lf94 commented 2 years ago

Aaaha. I will contact them. Is there any possible way miniflux could handle oddities like this? ala some user defined rule?

lf94 commented 2 years ago

We can close this issue as it's been determined miniflux is simply following the standard to a T. :slightly_smiling_face:

lf94 commented 2 years ago

I'm re-opening as I see there are multiple fallbacks for when Title is empty, and I believe trying the outermost text is a reasonable default. Opening a PR...!

fguillot commented 2 years ago

PR #1406 merged