'Any text with the metadata that is imported will be held in
single quotes, rather than double quotes and so these need
to be escaped to double quotes to make it valid JSON'

@staticmethod
def question_onvalidate(form):

    metadata = form.vars.metadata
    if (metadata != None):
        from xml.sax.saxutils import unescape
        metadata = unescape(metadata, {"'": '"'})
    return True
