Closed call-me-matt closed 1 year ago
maybe a bug in cheerio lib, as the function seems to be correctly used?
I tried the code outside of OSMBC and it works just fine.
Problem seems to be, that ssrf transforms the URL from https://en.osm.town/@weeklyOSM/110089639818050574 to https://en.osm.town/.
looks that ssrf reacts on "@"
https://www.npmjs.com/package/ssrf
i would suggest that we build a dedicated mastondon converter, wich ignores url check (and replaces is by a check against mastonon standard format, which can be handled by a regex). this may be needs, that the original url is forewarded to the converter (may be by forewarding two urls or using ssrf in the converter).
The more interesting question is, what is a good title for a titleless toot ?
Simple suggestion Toot By @XXX from dd.mm.yyyy
(titles are only suggested and can be changed by editor, if it is helpful for the process)
Simple suggestion Toot By @xxx from dd.mm.yyyy
This. Or one can take the first 100 chars (if they are no URL) and add …
currently i have just fixed the ssrf rejection of mastodon urls, so the standard mastodon title is now taken.
i would like to have a similar tweet (ä) toot -> collection process as in twitter. but as toots can be very long, the toots have to be truncated.
If a toot is added as article, the pre-filled title is always the same and does not use the actual title from the linked page.
AS-IS: the title is always: En OSM Town | Mapstodon for OpenStreetMap
TO-BE Take the actual title of the linked page, in the example: eeklyOSM: "👉 https://www.weeklyosm.eu/archives/16390 👈 Issu…" - En OSM Town | Mapstodon for OpenStreetMap
How to reproduce: got to https://en.osm.town, chose any post and add it to OSMBC, for example: https://en.osm.town/@weeklyOSM/110089639818050574
On the linked page, there is also a "domain title" in a script body, maybe a regex gets confused by that?
Examples: https://osmbc.openstreetmap.de/article/28351 https://osmbc.openstreetmap.de/article/28204 https://osmbc.openstreetmap.de/article/28014