1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-06-27 13:23:25 +02:00

112 Commits

Author SHA1 Message Date
Dag
e364dd1a20 fix(atom): omit item timestamp if absent ()
prev behavior inserted current time, which seems wrong
2025-05-08 22:37:56 +02:00
Dag
58b3cfb158 fix: drop extension requirement in feed icon url, fix () 2025-01-25 17:43:03 +01:00
Dag
6516e31c1b refactor: format rendering () 2024-08-23 17:34:06 +02:00
Dag
05e2c350b7 refactor: less reliance on super globals () 2024-08-22 00:33:35 +02:00
Dag
4602f4f475 tweaks () 2024-04-06 18:07:45 +02:00
Dag
545dc969d3 refactor () 2024-03-31 03:38:42 +02:00
Dag
d08d13f2c8 refactor: introduce http Request object () 2024-01-25 16:06:24 +01:00
Dag
2e5d2a88f3 fix: only escape iframe,script and link for html output () 2024-01-09 21:36:42 +01:00
Dag
3ce94409ab feat: support itunes namespace in top channel feed ()
Also preserves other properties.
2024-01-09 20:18:33 +01:00
658391263e Add 'itunes:duration' tag for items with duration ()
* [{Atom,Mrss}Format] Allow itunes tags on items without enclosure

* [Arte7Bridge] Add $item['itunes']['duration'] value
2023-10-19 17:02:53 +02:00
Dag
ef5bd83bd0 feat: preserve and reproduce podcast feeds (itunes rss module) () 2023-10-16 02:58:03 +02:00
Dag
f421c45b21 test: add feed item test ()
* test: add feed item test

also some refactor

* yup

* yup
2023-09-25 22:32:15 +02:00
Dag
fbaf26e8bf fix(html_format): add spacing below date if author is missing ()
* small ui tweak

* remove unused <div>

* refactor: rename method

* refactor: inline const

* refactor
2023-06-08 23:04:16 +02:00
224cce08a8 [Sfeed] Fixed category separator and random white spaces () 2023-03-12 15:21:21 +01:00
c1f446fd19 [Sfeed] Added new format ()
* [Sfeed] Added new format

* [Sfeed] Spaces instead of tabs

* [Sfeed] Move all global functions to class and fix phpcs warnings
2023-03-12 00:13:27 +01:00
Dag
e21394d2d3 refactor: html format ()
* refactor: html format

Fix a few small bugs too

* fix

* fix

* trigger build

* striptags instead of encode title
2022-10-16 12:03:57 +02:00
Dag
27b3d7c34e feat: improve logging and error handling ()
* feat: improve logging and error handling

* trim absolute path from file name

* fix: suppress php errors from xml parsing

* fix: respect the error reporting level in the custom error handler

* feat: dont log error which is produced by bots

* ignore error about invalid bridge name

* upgrade bridge exception from warning to error

* remove remnants of using phps builin error handler

* move responsibility of printing php error from logger to error handler

* feat: include url in log record context

* fix: always include url in log record contect

Also ignore more non-interesting exceptions.

* more verbose httpexception

* fix

* fix
2022-09-08 19:07:57 +02:00
Dag
2bbce8ebef refactor: general code base refactor ()
* refactor

* fix: bug in previous refactor

* chore: exclude phpcompat sniff due to bug in phpcompat

* fix: do not leak absolute paths

* refactor/fix: batch extensions checking, fix DOS issue
2022-08-06 22:46:28 +02:00
d107f8ed30 Improve Factory variable names () 2022-07-06 12:14:04 +02:00
Dag
4f75591060 Reformat codebase v4 ()
Reformat code base to PSR12

Co-authored-by: rssbridge <noreply@github.com>
2022-07-01 15:10:30 +02:00
Dag
af5648d928 refactor: FormatFactory () 2022-06-22 18:27:20 +02:00
10eb1c9a95 [FormatAbstract]: Ensure sanitizeHtml is given string ()
Sometimes `Item::getContent` returns `null`, in which case `sanitizeHtml`
would pass it to `str_replace`, which would raise `E_DEPRECATED` on PHP 8.1.
2022-06-17 20:46:15 +02:00
1af6cbeb1e [XML formats] Ensure elements are connected to DOM before further manipulation ()
We are setting xmlns attributes at the root element but PHP would
still attach redundant ones to the DOM elements created with `createElementNS`.
That was because PHP reconciles namespace attributes when appending elements to DOM
but since we previously only attached the elements after all children were attached,
the reconciliation algorithm was not able to see the root element’s attributes.

To fix this, let’s attach each element to its parent immediately after it is created.
2022-06-09 18:33:23 +02:00
90d22f0d80 [{Atom,Mrss}Format]: Generate using DomDocument ()
* [AtomFormat]: Generate using DomDocument

This will escape the HTML content for us as needed.

* [MrssFormat]: Generate using DomDocument

This will escape the HTML content for us as needed.
2022-06-07 23:22:03 +02:00
fb501652d5 Formats: Remove display & related method ()
Format should not be responsible for sending HTTP response.
2022-06-07 18:05:33 +02:00
158ee41be4 [AtomFormat] Remove redundant fallback content () 2022-05-08 04:21:32 +02:00
Dag
91283f3a62 fix: deprecation notice () 2022-04-13 21:35:54 +02:00
dag
dc01891634 fix: enclosure link privacy () 2022-04-08 23:14:43 +02:00
dag
461269195b fix: ignore partial json_encode() errors in JsonFormat ()
Without this change, JsonFormat simply returns
an empty array. 
2022-03-29 22:45:00 +02:00
dag
c87f4631f2 [core] feat: improve date rendering in html formatter () 2022-03-22 20:41:13 +01:00
ecaae735d9 [core] Support for bridge maintainers' donation URLs () 2021-06-26 00:45:25 +05:00
b25674b3a0 [HtmlFormat] Use str_ireplace() when creating feed format URLs ()
Fixes feed format URLs not being created with correct format value if html feed URL uses a lowercase format value.
2021-03-08 12:17:12 +05:00
8047041963 [Core] Include Media RSS namespace for Atom feeds
Include Media RSS namespace for Atom feeds
Fix 
Fix 
2020-05-19 10:00:12 +02:00
3179c1e884 [InstagramBridge] Fixed item thumb on video entries () 2020-02-26 22:13:40 +01:00
d65714fa47 [HtmlFormat] Add syndication links ()
Adds <link> elements for each additional output format in the <head> of
HTML format output to allow RSS readers to find the actual feeds
directly from the HTML page.
2019-11-09 18:43:21 +01:00
c8d5c85c76 formats: Add getMimeType() function ()
Allows getting the expected MIME type of the format's output. A
corresponding MIME_TYPE constant is also defined in FormatAbstract for
the format implementations to overwrite.
2019-10-31 19:00:12 +01:00
48d0385653 [core] Fix double XML encoding on Atom feed title () 2019-08-28 16:29:13 +02:00
987f42d6d4 logo: Add logo to the project
References 
2019-06-25 18:42:11 +02:00
99d4571c6b core: Make RSS-Bridge more usable via mobile devices
Adds styles for display sizes smaller than 768px where
elements are currently hardly usable. Note that RSS-Bridge
is not designed for mobile use, but some users may want
to try things on their mobile phone before using it in
real life applications.

Resolves 
2019-06-22 18:46:37 +02:00
7ff97c0c7b [HtmlFormat] Dynamically build buttons for other feed formats
Adding or removing feed formats from the "formats/" directory
currently has no effect on the buttons shown in the HTML format.
This can cause errors if users press one of the buttons for a
format that is no longer available on the server.

This commit changes the behavior to dynamically add buttons based
on the available formats. Syndication feeds, however, are no longer
supported as they require knowledge about the content type, which
is not known without further changes to the formats API (may be
added later if there is a demand).

Closes 
2019-06-19 23:13:37 +02:00
80f6a8b3d4 [MrssFormat] Rework to make it valid RSS 2.0 + Media RSS () 2019-02-06 17:18:33 +01:00
394149b114 core: Add item uid ()
'uid' represents the unique id for a feed item. This item is null by
default and can be set to any string value. The provided string value
is always hashed to sha1 to make it the same length in all cases.

References , 
2019-02-03 20:56:41 +01:00
ab2e566ee1 [AtomFormat] Update to comply with RFC 4287 ()
https://tools.ietf.org/html/rfc4287
2019-01-21 17:22:30 +01:00
8801ac9e64 format: Refactor JsonFormat to JSON Feed version 1 ()
JsonFormat now implements https://jsonfeed.org/version/1

Closes 
2019-01-05 13:20:11 +01:00
988635dcf3 core: Add FeedItem class ()
Add transformation from legacy items to FeedItems, before transforming
items to the desired format. This allows using legacy bridges alongside
bridges that return FeedItems.

As discussed in , instead of throwing exceptions on invalid
parameters, add messages to the debug log instead

Add support for strings to setTimestamp(). If the provided timestamp
is a string, automatically try to parse it using strtotime().

This allows bridges to simply use `$item['timestamp'] = $timestamp;`
instead of `$item['timestamp'] = strtotime($timestamp);`

Support simple_html_dom_node as input paramter for setURI

Support simple_html_dom_node as input parameter for setContent
2018-12-26 22:41:32 +01:00
e7d3a006c8 global: Fix code violations 2018-12-26 21:58:07 +01:00
946e66e9df core: Use REPOSITORY constant where applicable 2018-11-05 19:05:59 +01:00
392e3ff6c7 phpcs: Fix violations 2018-11-05 12:55:58 +01:00
85e8a67568 [MrssFormat.php] Prevent PHP Notice ()
Prevent PHP Notice when running in CLI mode
2018-10-15 18:14:06 +02:00
93e7ea9fea [HtmlFormat] Make feeds available via syndication links 2018-09-22 19:51:18 +02:00