Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS parsing with libxml #2404

Merged
merged 3 commits into from
Jan 9, 2023
Merged

RSS parsing with libxml #2404

merged 3 commits into from
Jan 9, 2023

Conversation

TrimmingFool
Copy link
Contributor

Revision of #2379

  • support php7 with str_starts_with, str_ends_with
  • No composer

supports error messages
use regex based class if libxml not available
@stickz
Copy link
Collaborator

stickz commented Dec 26, 2022

I like this pull request. @Antorell would you like to help test it, so we can get it merged? Perhaps, it might resolve the problem with the XML tags. You mentioned an issue with <strong> <p> <b> etc. on a private tracker website. Could you post screenshots? If this pull request resolves your problem? We just need some testing here before it's merged.

@Novik
Copy link
Owner

Novik commented Dec 26, 2022

@stickz

If this pull request resolves your problem?

No, this PR will not helps with this. We have this behavior due to replacement html() with text() in the plugin's init.js file on this 504073c?diff=unified commit.
Of course, old version was insecure, but view in the new version is ugly.
We need something like

const doc = new DOMParser().parseFromString(String(data), 'text/html');
$("#rsslayout").text(doc.body.textContent || '');

here.

@TrimmingFool

Correct stripping tags in js and add call of libxml_disable_entity_loader for php 7, please.
Something like

if( function_exists('libxml_disable_entity_loader') ) {
    libxml_disable_entity_loader( true );
}

on initialization.

@stickz
Copy link
Collaborator

stickz commented Dec 26, 2022

Thanks @Novik for the update. This pull request will be delayed until the ruTorrent 4.1 stable point release. Priority low set. Priority will be raised once the ruTorrent 4.0 stable release has been created.

@stickz
Copy link
Collaborator

stickz commented Dec 26, 2022

No, this PR will not helps with this. We have this behavior due to replacement html() with text() in the plugin's init.js file on this 504073c?diff=unified commit. Of course, old version was insecure, but view in the new version is ugly. We need something like

const doc = new DOMParser().parseFromString(String(data), 'text/html');
$("#rsslayout").text(doc.body.textContent || '');

here.

@TrimmingFool I would like to merge a fix to this problem before releasing ruTorrent 4.0 stable. If you can get @Antorell to help test it with screenshots, we can merge the pull request. Priority critical will be assigned to the Pull Request.

@Antorell
Copy link

I posted two feeds from public trackers that have the formatting issue here :
504073c#commitcomment-94224200

https://feed.animetosho.org/rss2

https://www.limetorrents.lol/rss/

@stickz stickz added the v4.1 label Dec 26, 2022
@stickz
Copy link
Collaborator

stickz commented Jan 7, 2023

@TrimmingFool Could you request PR #2393 and #2404 to merge into the new develop branch? It will take time until I can merge new features into master. I want to keep you going on anther branch, until major platforms switch to version 4.0 stable.

@TrimmingFool TrimmingFool changed the base branch from master to develop January 8, 2023 14:59
@TrimmingFool
Copy link
Contributor Author

I want to keep you going on anther branch, until major platforms switch to version 4.0 stable.

@stickz Thank you for all your effort of moving things forward while keeping everything stable. JFYI, my involvement in ruTorrent is merely recreational and, at the moment, I don't plan on implementing any new features.

@stickz
Copy link
Collaborator

stickz commented Jan 9, 2023

@stickz Thank you for all your effort of moving things forward while keeping everything stable. JFYI, my involvement in ruTorrent is merely recreational and, at the moment, I don't plan on implementing any new features.

Not a problem. I just don't want to deter improvements for weeks. The purpose of the development branch is to allow more flexibility to compound changes, avoid the testing sprint after each stable release and merge changes that require testing.

@stickz stickz merged commit 422f7df into Novik:develop Jan 9, 2023
stickz added a commit that referenced this pull request Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants