mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
[website] [fix] fixes in sitemap and rss generators
This commit is contained in:
@@ -49,9 +49,10 @@ rss_item = u"""
|
||||
|
||||
def generate():
|
||||
"""generate rss feed"""
|
||||
import webnotes, os
|
||||
import os, urllib
|
||||
import webnotes
|
||||
from webnotes.model.doc import Document
|
||||
from website.helpers.blog import get_blog_content
|
||||
from webnotes.utils import escape_html
|
||||
|
||||
host = (os.environ.get('HTTPS') and 'https://' or 'http://') + os.environ.get('HTTP_HOST')
|
||||
|
||||
@@ -62,7 +63,8 @@ def generate():
|
||||
order by published_on desc limit 20""", as_dict=1)
|
||||
|
||||
for blog in blog_list:
|
||||
blog.link = host + '/' + blog.name + '.html'
|
||||
blog.link = urllib.quote(host + '/' + blog.name + '.html')
|
||||
blog.content = escape_html(blog.content or "")
|
||||
|
||||
items += rss_item % blog
|
||||
|
||||
|
||||
Reference in New Issue
Block a user