aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2011-08-25 22:17:31 +0200
committercedricbonhomme <devnull@localhost>2011-08-25 22:17:31 +0200
commitaa135653e325dc596c56e62aae574a4eea5ae373 (patch)
tree8c35608ff4b58b513b9e22382fdfa47030fcea6a /pyAggr3g470r.py
parentMinor improvement of the control script (test if there is an argument). (diff)
downloadnewspipe-aa135653e325dc596c56e62aae574a4eea5ae373.tar.gz
newspipe-aa135653e325dc596c56e62aae574a4eea5ae373.tar.bz2
newspipe-aa135653e325dc596c56e62aae574a4eea5ae373.zip
HTML tags between <code> tags are now escaped by a regular expression.
Diffstat (limited to 'pyAggr3g470r.py')
-rwxr-xr-xpyAggr3g470r.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index c79f3059..b6ecb8d7 100755
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -460,6 +460,12 @@ class Root:
# Description (full content) of the article
description = article.article_description
if description:
+ p = re.compile(r'<code><')
+ q = re.compile(r'></code>')
+
+ description = p.sub('<code>&lt;', description)
+ description = q.sub('&gt;</code>', description)
+
html += description + "\n<br /><br /><br />"
else:
html += "No description available.\n<br /><br /><br />"
bgstack15