prof18 / RSS-Parser

A Kotlin Multiplatform library to parse a RSS Feed
Apache License 2.0
516 stars 128 forks source link

Fix image empty tag parsing on Android #123

Closed skrugly closed 1 year ago

skrugly commented 1 year ago

Hey, first of all thanks for the great library.

I've come across parsing rss feed from https://hackernoon.com/feed and noticed that they have an empty image tag followed by media:thumbnail with the actual image. The Android XML parser is crashing with NPE at that line trying to trim an null string

val text = xmlPullParser.text.trim()

I this PR I'am proposing an easy fix for that bug.

prof18 commented 1 year ago

Uh, nicely spotted! Thanks!