Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix a bug when tags are present in a script

  • Loading branch information...
commit efb77ae91995413d624c082c91beaac6220264a5 1 parent d8959ad
@fmarcia authored
Showing with 15 additions and 2 deletions.
  1. +15 −2 zencoding/html_navigation.py
View
17 zencoding/html_navigation.py
@@ -358,7 +358,17 @@ def get_next_token():
elif token.startswith('</'):
- if node.type == 'data':
+ if node.type == 'script-data':
+
+ name = token[2:-1].rstrip().lower()
+ if name == 'script':
+ node.type = 'data'
+ node.end = offset
+ node = node.parent
+ node.end = end
+ node = node.parent.append('data', end)
+
+ elif node.type == 'data':
node.end = offset
@@ -410,7 +420,10 @@ def get_next_token():
node = node.parent.append('data', end)
else:
node.type = 'tag'
- node = node.append('data', end)
+ if node.name == 'script':
+ node = node.append('script-data', end)
+ else:
+ node = node.append('data', end)
elif token == '"':
if node.type == 'attribute' and previous_token == '=':
Please sign in to comment.
Something went wrong with that request. Please try again.