Commit Graph

48 Commits

Author SHA1 Message Date
David Edler de1e218a83
various fixes vor php 8.1 compatibility
Cherry-picked from https://git-gitea.tt-rss.org/fox/tt-rss/pulls/56,
while excluding changes in vendor/ (causes compatiblity issues with
PHP<8 [1]) and strftime-related ones (already re-applied in
https://git-gitea.tt-rss.org/fox/tt-rss/pulls/66).

[1] https://community.tt-rss.org/t/support-for-php-8-1/5089/9
2022-03-09 00:46:15 +08:00
Andrew Dolgov c3482fbe6b generate a warning if plugin-generated content of HOOK_ARTICLE_BUTTON or _LEFT_BUTTON can't be parsed as valid XML 2022-01-06 10:37:03 +03:00
Andrew Dolgov a201e10ee0 Revert "various fixes vor php 8.1 compatibility"
This reverts commit 14027ae04e.
2021-12-01 13:37:35 +03:00
David Edler 14027ae04e various fixes vor php 8.1 compatibility 2021-11-30 21:50:09 +01:00
wn_ fb1e85baaf Switch FeedParser back to described behavior for setting 'error'.
Also some formatting.
2021-11-17 19:29:54 +00:00
wn_ 109b702ed0 Minor fix to DOMNodeList#item() potential type (null vs false) 2021-11-15 12:24:38 +00:00
Andrew Dolgov aa924d9ee7 deal with several DOMElement-related errors 2021-11-15 08:26:02 +03:00
wn_ f5c881586b Handle potentially null link, title, etc. in FeedParser. 2021-11-14 16:59:21 +00:00
Andrew Dolgov 77b8dc7386 fix phpstan warnings in classes/feedparser.php 2021-11-13 17:48:52 +03:00
Andrew Dolgov c94f1b6ff8 fix some more warnings reported by phpstan 2021-02-06 17:38:24 +03:00
Andrew Dolgov 9423d72f6c parser: force libxml error messages to valid utf8 2019-05-12 10:13:22 +03:00
Andrew Dolgov 1a484ec3f5 feedparser: remove horrible hacks for feeds with broken encoding 2019-04-01 09:02:05 +03:00
Andrew Dolgov 55ef85adc0 parser: clean() attribute values by default (except content) 2018-12-26 10:16:11 +03:00
Tobias Kappé 22a866edb5 Store language of entries as indicated by the feed. 2018-08-12 15:27:26 +01:00
Andrew Dolgov ea79a0e033 remove some redundant php closing tags 2017-04-26 20:24:18 +03:00
Andrew Dolgov e4071d2544 feedparser: fix syntax error 2016-11-11 19:47:09 +03:00
Andrew Dolgov 4a5490dc58 feedparser: fix normalize_encoding() not working properly for some encodings 2016-11-11 14:08:40 +03:00
Andrew Dolgov cde8272205 parser: only try to convert encoding if mbstring actually supports it 2016-09-05 15:02:31 +03:00
Andrew Dolgov e55a5ec601 atom: consider link rel=alternate in feed element for site urls 2015-04-21 13:40:22 +03:00
Lukas Hybner 4834ad5639 fix parse atom feed 2015-02-02 10:57:32 +01:00
Andrew Dolgov 31bd6f7643 parser: trim some some feed-extracted data link titles and links 2014-03-04 16:38:04 +04:00
Andrew Dolgov 4ce778677e Revert "parser: experimentally set preservewhitespace to false"
This reverts commit b69d94eeeb.
2014-03-04 16:30:46 +04:00
Andrew Dolgov b69d94eeeb parser: experimentally set preservewhitespace to false 2014-03-03 21:04:28 +04:00
wltb d71ac5d3da implemented get_comments_url() and Atom Threading Extension 2013-12-18 17:06:43 +01:00
Andrew Dolgov 4ad04ee227 report all libxml errors in updater debug output
force utf8 encoding if devforceupdate is on
parser: try to convert non-unicode feeds with specified encoding to utf8
before trying to remove dangling utf8 characters in case of utf8-related
libxml errors because doing so produces garbage content
2013-10-29 12:15:26 +04:00
wltb 2c6f3c2eb3 Feedparser: Add important check for unknown feed type detection 2013-09-27 00:13:55 +02:00
wltb 54f23d38a6 Feedparser: Store libXML fatal error messages in an array, repair error reporting 2013-09-26 19:56:45 +02:00
Andrew Dolgov 4d49863f65 fix style in feedparser 2013-09-25 14:26:45 +04:00
wltb d3305ff8de Feedparser: Only format fatal errors 2013-09-24 16:43:47 +02:00
wltb 5fa36a6401 Feedparser: Change handling of libxml error 9 (cycle all errors) 2013-09-24 16:38:28 +02:00
Andrew Dolgov f612dbe8a0 improve support for feeds with invalid unicode entities 2013-08-03 14:45:27 +04:00
wltb f8160106af Feedparser/encoding change: More general regular expression, set encoding to UTF-8 explicitly 2013-07-15 00:25:45 +02:00
Andrew Dolgov 4f00f55ca2 parser: add charset recoding hack for systems where libxml is build without support for iconv (handles libxml error 32) 2013-07-11 15:40:09 +04:00
Andrew Dolgov a9000b0344 feedparser: check if initial xpath query for root element returns anything 2013-06-19 19:40:36 +04:00
Andrew Dolgov f17c3ee29a parser: fix get_links() for RSS 2013-05-24 14:40:47 +04:00
Andrew Dolgov 1874c8d6df feedparser: properly handle nodeValue of rss channel link element (closes #692) 2013-05-23 20:32:54 +04:00
Andrew Dolgov d1f3fa9791 try to force-convert feed data to utf8 2013-05-17 20:09:43 +04:00
Andrew Dolgov a3b9fd12c5 fix support of Atom 0.3 2013-05-15 09:09:25 +04:00
kpn3m0 349c4229fd Feature #686
If the feed cannot be parsed there is not particular error but always "Unknown/unsupported feed type". The patch uses the error from the XML parser which gives more detailed error reporting.
2013-05-14 15:32:36 +03:00
Andrew Dolgov 8a95d630a9 fix rss content:encoded not used 2013-05-01 22:05:59 +04:00
Andrew Dolgov d4992d6b48 add support for dc:subject and slash:comments 2013-05-01 20:55:08 +04:00
Andrew Dolgov 852d4ac890 support RDF-XML feeds 2013-05-01 20:30:52 +04:00
Andrew Dolgov 4c00e15b5d pass xpath object to feeditem, support media-rss objects 2013-05-01 19:40:43 +04:00
Andrew Dolgov 3c8060aca0 fix get_links() for RSS 2013-05-01 19:09:07 +04:00
Andrew Dolgov b9eee80e08 parser: add get_links() 2013-05-01 19:08:04 +04:00
Andrew Dolgov b8f316dc28 change caching to save xml data, remove RDF init section 2013-05-01 17:56:21 +04:00
Andrew Dolgov 04d2f9c831 add basic rss support 2013-05-01 17:38:16 +04:00
Andrew Dolgov cd07592c29 add basic tinyparser/atom 2013-05-01 17:04:57 +04:00