From 4ef63b3664d0d5a33e8b396a481b635cd80d1d8d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 28 Jan 2011 16:07:17 -0500 Subject: [PATCH] ENH: sanitize long descriptions prior embedding into the .rst --- neurodebian/dde.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neurodebian/dde.py b/neurodebian/dde.py index ab223ab..86aafcd 100755 --- a/neurodebian/dde.py +++ b/neurodebian/dde.py @@ -23,6 +23,7 @@ import urllib import codecs import subprocess import time +import re # templating from jinja2 import Environment, PackageLoader @@ -584,6 +585,8 @@ def convert_longdescr(ld): ld = ld.replace('#NEWLINEMARKER# ', '\n\n') # cleanup any leftover (e.g. trailing markers) ld = ld.replace('#NEWLINEMARKER#', '') + # safe-guard ReST active symbols + ld = re.sub(r'([\'`*])', r'\\\1', ld) return ld -- 2.39.2