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

Merge branch 'develop' into binary-parse

This commit is contained in:
Ilya Kreymer 2014-06-28 11:53:50 -07:00
commit 57a38dedce
2 changed files with 5 additions and 1 deletions

View File

@ -128,7 +128,7 @@ class JSLinkAndLocationRewriter(JSLinkOnlyRewriter):
(r'(?<=document\.)referrer', RegexRewriter.add_prefix(prefix), 0),
#todo: move to mixin?
(r'(?:[\s=()]|^)(top)(?:[\s!=()]|$)',
(r'(?:[\s=(){]|^)(top)(?:[\s!=}()]|$)',
RegexRewriter.add_prefix(prefix), 1),
(r'(?<=window\.)top',

View File

@ -82,6 +82,10 @@ def test_example_domain_specific_3():
# comment out bootloader
assert '/* Bootloader.configurePage' in buff
def test_wombat_top():
status_headers, buff = get_rewritten('https://assets-cdn.github.com/assets/github-0f06d0f46fe7bcfbf31f2380f23aec15ba21b8ec.js', urlrewriter)
assert 'WB_wombat_top!==window' in buff
def test_post():
buff = BytesIO('ABC=DEF')