aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpyblog3
1 files changed, 3 insertions, 0 deletions
diff --git a/pyblog b/pyblog
index b11435a8..c6a7ac3e 100755
--- a/pyblog
+++ b/pyblog
@@ -390,6 +390,9 @@ def generate_index_and_feed():
# remove line numbers
for line_number_span in article.find_all("span", attrs={"class": "line-number"}):
line_number_span.extract()
+ # remove script tags
+ for script_tag in article.find_all("script"):
+ script_tag.extract()
entry.content_html = ''.join([str(content)
for content in article.contents])
entry.content = ET.Element("content", type="html")