summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Wiesner <basti.wiesner@gmx.net>2009-03-19 16:19:12 +0100
committerSebastian Wiesner <basti.wiesner@gmx.net>2009-03-19 16:19:12 +0100
commitf239bb85e461346571ab645ef670026c0943690b (patch)
treeac6ad7057ba565593e0f0820e465a0c6d8f49e46
parent75362e8cc9810c2c8afc16145b6b82cd1f8292c1 (diff)
downloadsphinx-f239bb85e461346571ab645ef670026c0943690b.tar.gz
#127: string-escape user-input from quickstart
-rw-r--r--sphinx/quickstart.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index cfdb97e7..0de45d3f 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -642,6 +642,12 @@ directly.'''
mkdir_p(path.join(srcdir, d['dot'] + 'templates'))
mkdir_p(path.join(srcdir, d['dot'] + 'static'))
+ def escape(key):
+ d[key] = d[key].encode('string-escape')
+ for key in ('project', 'copyright', 'version', 'release',
+ 'master', 'suffix'):
+ escape(key)
+
conf_text = QUICKSTART_CONF % d
if d['ext_intersphinx'].upper() in ('Y', 'YES'):
conf_text += INTERSPHINX_CONFIG