Skip to content

add support for more media types as enclosures, handle result of /tex…#2324

Merged
dvikan merged 4 commits intoRSS-Bridge:masterfrom
Niehztog:xpath_support_more_media_types
Mar 24, 2022
Merged

add support for more media types as enclosures, handle result of /tex…#2324
dvikan merged 4 commits intoRSS-Bridge:masterfrom
Niehztog:xpath_support_more_media_types

Conversation

@Niehztog
Copy link
Contributor

@Niehztog Niehztog commented Nov 3, 2021

Hi @em92
here come two small fixes for class XPathAbstract:

  • support mp3 files in item enclosures (in addition to image formats)
  • correctly deal with XPath expressions using /text() XPath function (they might return instanctes of DOMText)

@Niehztog Niehztog force-pushed the xpath_support_more_media_types branch from 95274ac to c99b1db Compare November 3, 2021 16:23
Comment on lines +533 to +535
protected function cleanImageUrl($imageUrl)
{
$result = preg_match('~(?:http(?:s)?:)?[\/a-zA-Z0-9\-_\.]+\.(?:jpg|gif|png|jpeg|ico){1}~', $imageUrl, $matches);
$result = preg_match('~(?:http(?:s)?:)?[\/a-zA-Z0-9\-_\.]+\.(?:jpg|gif|png|jpeg|ico|mp3){1}~', $imageUrl, $matches);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like cleanImageUrl should be renamed to cleanMediaUrl. Same about parameter.

@em92
Copy link
Contributor

em92 commented Nov 6, 2021

Hey, @Niehztog! Left comment above.

@Niehztog
Copy link
Contributor Author

Niehztog commented Nov 8, 2021

Hello @em92 , thank you for your feedback, I changed my code accordingly.

@Niehztog Niehztog changed the title add supprot for more media types as enclosures, handle result of /tex… add support for more media types as enclosures, handle result of /tex… Feb 12, 2022
@dvikan dvikan merged commit 55acf66 into RSS-Bridge:master Mar 24, 2022
IAM-marco pushed a commit to IAM-marco/rss-bridge that referenced this pull request Jun 17, 2022
@Niehztog Niehztog deleted the xpath_support_more_media_types branch October 15, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants