- raise WebError("Cannot create directory '%s', because its "
- "parent is a file, not a directory" % name)
- raise WebError("Files have no children, certainly not named '%s'"
- % name)
+ raise WebError("Cannot create directory %s, because its "
+ "parent is a file, not a directory" % quote_output(name, encoding='utf-8'))
+ raise WebError("Files have no children, certainly not named %s"
+ % quote_output(name, encoding='utf-8'))