I am working on adding a feed to one of our pages on our site to pull the blog that we have on the clearspace community. The feed description is showing some strange code: <!-- [DocumentBodyStart:0eb49085-9ab5-469f-ac6b-d5db61718f33] --><!----> I have also attached a screenshot.
The blog lives here: http://line6.com/community/community/line_6_blog
and the code I put in the pages is:
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAA3T1M0SptbL2dhAx1D39GABRIY-PeZWTrQDJbyAwc-nOZbPfUdRRy8KXNzNXzt6SpzwphYrakELBc8Q"></script>
<script type="text/javascript">
google.load("feeds", "1");
</script>
<script type="text/javascript">
google.load("feeds", "1");
function initialize() {
var feedControl = new google.feeds.FeedControl();
feedControl.addFeed("http://line6.com/community/community/feeds/blogs?community=2198");
feedControl.draw(document.getElementById("feedControl"));
}
google.setOnLoadCallback(initialize);
</script>
Could you let me know if I am doing something wrong that is making that strange code appear?
Thanks!
Angela
Hi Angela,
This comment tag is something that Clearspace puts into the RSS feed. This is normally not seen, because RSS feed readers should be decoding any html characters before rendering it. You should be able to fix this by decoding the HTML characters before embedding it into the page. Making this change will also make it so that other HTML markup (such as Images, header, and bold tags) wil be rendered correctly.
You may be able to accomplish this using the unescapeHTML function that is part of the Prototype library:
function stripTags() {
return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
}
function unescapeHTML() {
return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&');
}
Taken from http://prototypejs.org/assets/2009/8/31/prototype.js
Let me know if you have any more questions about this.
Thanks,
Cory
Hi Cory,
It's me again
On this thread, I wanted to also ask about the code that appears in the description. When I was researching those other RSS Feeds, it seems that Digg RSS Feed puts one line of description and then adds the code, so the Reader only picks up that one line and and Techcrunch they use CDATA code in the description. I haven't looked at wordpress yet, but I am wondering if that is where the code showing up in the Google reader is occuring with the Clearspace RSS Feed. Here is a Screenshot of how all the feeds look in Feedburner. Thanks so much for all your help with this!
Hi Angela,
There is actually a known bug ( ID CS-12129 ) that causes these document comments to be rendered in the RSS feed. This issue has been fixed in version 2.5.13.
Jive combines the most powerful features of collaboration software, community software,
social networking software & social media monitoring into the leading SBS solution.
© Copyright 2000–2010 Jive Software. All rights reserved.
915 SW Stark St., Suite 400, Portland, OR 97205
Sales: 877-495-3700 | General: 503-295-3700
Privacy Policy | Sitemap | Jobs | Contact Us