JupiterBroadcasting / plugin.video.jupiterbroadcasting

:tv: Jupiter Broadcasting Kodi Addon
https://kodi.tv/addon/plugins-video-add-ons/jupiter-broadcasting
GNU General Public License v2.0
18 stars 14 forks source link

User Error Show descriptions showing <p> tag #69

Closed rickyphewitt closed 7 years ago

rickyphewitt commented 7 years ago

Not sure if this affects other shows, but looking at the descriptions of the User Error shows in Kodi they contain <p> tags. Those tags and any other html tags should be stripped out prior to setting the description. Other shows descriptions should be audited for this as well. 20161203_104300

RobLoach commented 7 years ago

Good catch... We could pass the descriptions through this regex: http://stackoverflow.com/a/4869782

re.sub('<[^<]+?>', '', text)
rikai commented 7 years ago

I think using something from this post may be better.

Using a regex, especially such a simple one, will run into edge cases sooner or later I'm sure so we might as well get it right the first time around, even if it does mean a bit more reading. ;)

rickyphewitt commented 7 years ago

Agreed @rikai.