1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

rewrite: top rewrite: avoid rewriting 'top('

This commit is contained in:
Ilya Kreymer 2015-05-14 22:07:51 -07:00
parent d55bac70c1
commit 0223ac0489

View File

@ -137,10 +137,10 @@ class JSLocationRewriterMixin(object):
(r'(?<=document\.)cookie', RegexRewriter.add_prefix(prefix), 0),
#todo: move to mixin?
(r'(?<=[\s=(){])(top)\s*(?:[!}()]|==|$)',
(r'(?<=[\s=(){])(top)\s*(?:[!})]|==|$)',
RegexRewriter.add_prefix(prefix), 1),
(r'^(top)\s*(?:[!}()]|==|$)',
(r'^(top)\s*(?:[!})]|==|$)',
RegexRewriter.add_prefix(prefix), 1),
(r'(?<=window\.)(top)',