Commit ce30a27f by Calen Pennington

Small changes to make xml dump into as few files as possible

parent 10b417c8
......@@ -149,10 +149,15 @@ class HtmlDescriptor(XmlDescriptor, EditingDescriptor):
write just <html filename="" [meta-attrs="..."]> to filename.xml, and the html
string to filename.html.
'''
# If the file is a single html document, just use it directly
try:
return etree.fromstring(self.definition['data'])
except etree.XMLSyntaxError:
pass
# Otherwise, try wrapping it in a single html tag, and returning that
try:
return etree.fromstring("<html>%s</html>" % self.definition['data'])
except etree.XMLSyntaxError:
pass
# Not proper format. Write html to file, return an empty tag
pathname = name_to_pathname(self.url_name)
......
......@@ -326,7 +326,7 @@ class XmlDescriptor(XModuleDescriptor):
NOTE: Do not override this without a good reason. It is here
specifically for customtag...
"""
return True
return False
def export_to_xml(self, resource_fs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment