Rss/xml image tags are not closed


#1

Hi, we are to post HubSpot rss feed on an external web site. Image tags in the rss xml are not closed, so the xsl wont compile the xml.

Any suggestions to fix this, or is there an option in HubSpot I have missed?


#2

Hi @rolvskjaerpe, can you link the blog in HubSpot that you're looking to embed onto your external site as well as the page you're trying to place it on? Happy to help here.


#4

Would love to help, but I am not exactly clear on the issue :slight_smile:


#5

Hi Connor. Here is link to the external site:
https://papirflyweb.test.papirfly.no/com/home/your-business/employer-branding

Iit is this page in hubspot we are receiving as rss/xml:
https://retail.papirfly.com/?__hstc=156772004.61385b281747dcf3911406a6dbabdec0.1525276335312.1540882925344.1541407106879.63&__hssc=156772004.1.1541407106879&__hsfp=3443925054

The xml we receive looks is this:
https://retail.papirfly.com/topic/local-marketing/rss.xml
This feed renders like you kan see in my first link.

However, if I close the image tags, like in the link below, all the feed renders like i should.
https://papirflyweb.test.papirfly.no/web2015/blogg.xml

Thanks
Rolv


#6

Hi @rolvskjaerpe, Thanks for the extra information. This seems like an issue with the way your CMS is processing the HubSpot RSS feed. I'm able to use a HubSpot RSS module and print out the contents of your feed here: https://www.playtimepottery.net/api-test. HubSpot uses encoded content tags in our XML files to display data. Since image tags are implicitly closed, closing the image tags might have been a red herring.

This stackoverflow thread's last reply goes over the fact that there have been changes to the way that RSS feeds can be rendered (and thus, processed). When I use the URL option in this RSS viewer here: https://codebeautify.org/rssviewer, I'm able to load in the feed and see all data.

You can also try using an RSS converting tool to input your blog and generate an RSS feed that is more compatible with your current CMS's RSS feed module.


#7

Thanks Connor. :slight_smile:


#8

Hi again Connor. I see that you are not displaying images in the example. I'm still not able to compile the xml because the "unclosed" image tags. The xml are being red flagget in Visual Studio.

Came across this when googeling the problem:

The <img> tag represents what is known as a void element (see HTML5 spec), so called because it can't have any contents (unlike, say <a> or <div> ). Therefore there is no syntactic reason why it should need to be closed in HTML.

XHTML, however, is based on XML, where every tag needs to be closed.


#9

This is currently working as designed - we only include featured images in the RSS Listing Module when the RSS feed being included is that of a HubSpot hosted blog. This is because the concept of a featured image isn't part of the RSS feed standard (see http://www.rssboard.org/rss-profile for documentation of the standard), so when the feed is external, there's no universal way to identify the featured image for each post in an RSS feed. There seem to be some common ways people include featured images in the content:encoded element in their Wordpress (or other CMS') blog RSS feeds, but it can vary from blog to blog.


#10

Hi Connor. I owe you an apology. The rss/xml from HubSpot is impeccable. I, as a rss/xml noob, clearly haven't a clue of what I'm doing. Turns out that it was a matter of decoding the content in the xml. All the nagging about unclosed image tag was a result of me using the xml url, rendered in Chrome, as xml source.

Sorry for taking your time.

Regards
Rolv :face_with_hand_over_mouth:


#11

Thats okay @rolvskjaerpe! You didn't waste my time - I learned a bit more about XML/RSS in the process :smile: