pick up www-site version
diff --git a/theme/plugins/asfgenid.py b/theme/plugins/asfgenid.py
index 2b5520f..78b3267 100644
--- a/theme/plugins/asfgenid.py
+++ b/theme/plugins/asfgenid.py
@@ -2,7 +2,7 @@
asfgenid
===================================
Generates HeadingIDs, ElementID, and PermaLinks
-First find all specified IDs and classes. Assure unique ID and permalonk
+First find all specified IDs and classes. Assure unique ID and permalink
Next find all headings missing IDs. Assure unique ID and permalink
Generates a Table of Content
'''
@@ -153,6 +153,7 @@
text = content._content
modified = False
# Find messed up html
+ # fix scripts
SCRIPTS_RE = re.compile(r'<script')
m = SCRIPTS_RE.search(text)
if m:
@@ -163,6 +164,7 @@
if m:
modified = True
text = re.sub(SCRIPTS_RE, '</script', text)
+ # fix styles
STYLE_RE = re.compile(r'<style')
m = STYLE_RE.search(text)
if m:
@@ -173,6 +175,17 @@
if m:
modified = True
text = re.sub(STYLE_RE, '</style', text)
+ # fix iframes
+ IFRAME_RE = re.compile(r'<iframe')
+ m = IFRAME_RE.search(text)
+ if m:
+ modified = True
+ text = re.sub(IFRAME_RE, '<iframe', text)
+ IFRAME_RE = re.compile(r'</iframe')
+ m = IFRAME_RE.search(text)
+ if m:
+ modified = True
+ text = re.sub(IFRAME_RE, '</iframe', text)
if modified:
content._content = text