Permalink
Browse files

Fixing critical flaw: missing 'description' field in Epub output. Als…

…o making handling of quotes in metadata better.
  • Loading branch information...
1 parent 96c747c commit a02c6a08fd5c5110137a82647bf7dd96cdce5b2c @bkidwell committed Jan 29, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 mdepub/actions/epub.py
View
@@ -15,7 +15,7 @@
def quote(text):
"""Change " to '."""
- return text.replace('"', '\'')
+ return unicode(text).replace('"', '\\"')
def run():
"""Run this action."""
@@ -77,6 +77,9 @@ def run():
):
if options.get(b): args.append("--{}=\"{}\"".format(a, quote(options[b])))
+ if description:
+ args.append( "--comments=\"{}\"".format(quote(description)) )
+
if options.get("tags"):
args.append( "--tags=\"{}\"".format(quote(','.join(options['tags']))) )

0 comments on commit a02c6a0

Please sign in to comment.