Permalink
Browse files

Merge pull request #20 from hughht5/patch-2

Fixed broken RSS links
  • Loading branch information...
2 parents d71fcfb + ca4ed28 commit 17655354cd4d0212aebe015dc7d2b2c440ff8a88 @guyht committed Oct 16, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/glog.js
View
@@ -263,7 +263,11 @@ Glog.prototype.render_rss = function(options, articles, cb) {
}),
len = articles.length, i;
- for(i=0;i<len;i++) {
+ for(i=0;i<len;i++) {
+ //encode the URL in case of special chars
+ var xurl = '/'+encodeURIComponent(articles[i].url);
+ xurl = xurl.replace('%2F',"/").replace('%2F',"/"); //but dont encode the slashes in the date!
+
feed.item({
title : articles[i].title,
description : articles[i].body,

0 comments on commit 1765535

Please sign in to comment.