Skip to content
Browse files

Fixed broken RSS links

see #19
  • Loading branch information...
1 parent d71fcfb commit ca4ed2804b799034c053c57d4af6c9cadc7d06ee @hughht5 hughht5 committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/glog.js
View
6 lib/glog.js
@@ -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 ca4ed28

Please sign in to comment.
Something went wrong with that request. Please try again.