Commit 1b5a9bc5 by Calen Pennington

Moving the 'id' prefix back into content_parser where it exists

parent dea0d28a
...@@ -118,7 +118,7 @@ def id_tag(course): ...@@ -118,7 +118,7 @@ def id_tag(course):
new_id = default_ids[elem.tag] + new_id new_id = default_ids[elem.tag] + new_id
elem.set('id', new_id) elem.set('id', new_id)
else: else:
elem.set('id', fasthash(etree.tostring(elem))) elem.set('id', "id"+fasthash(etree.tostring(elem)))
def propogate_downward_tag(element, attribute_name, parent_attribute = None): def propogate_downward_tag(element, attribute_name, parent_attribute = None):
''' This call is to pass down an attribute to all children. If an element ''' This call is to pass down an attribute to all children. If an element
......
...@@ -9,7 +9,7 @@ import urllib ...@@ -9,7 +9,7 @@ import urllib
def fasthash(string): def fasthash(string):
m = hashlib.new("md4") m = hashlib.new("md4")
m.update(string) m.update(string)
return "id"+m.hexdigest() return m.hexdigest()
def safe_key(key, key_prefix, version): def safe_key(key, key_prefix, version):
safe_key = urllib.quote_plus(smart_str(key)) safe_key = urllib.quote_plus(smart_str(key))
......
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