Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewriting Global + Live Proxy Fixes #158

Merged
merged 7 commits into from
Jan 20, 2024
Merged

Rewriting Global + Live Proxy Fixes #158

merged 7 commits into from
Jan 20, 2024

Conversation

ikreymer
Copy link
Member

@ikreymer ikreymer commented Jan 20, 2024

Globals:

  • Don't rewrite globals if they're redeclared locally (fixes wombat's addition to JavaScript file causing syntax error wombat#127)
  • Fix parsing of inline attributes: parse if starts with 'javascript:' or property name starts with on* (matches pywb behavior more accurately)
  • rewrite: replace newlines for inline attr before acorn parse, and also after wrap
  • tests: add tests for inline attribute parsing, including wrapping bump to 2.17.0

Live Proxy:

  • when proxying to an existing web archive, remove the web archive prefix from the redirect URL to avoid double-adding the redirect
  • support timestamp / web archive mode proxy
  • support updating URL when navigating to new page.

…nd skip wrapper override if already overridden in script,

eg. 'parent', 'window', etc... - fix for webrecorder/wombat#127
examples: update live proxy example to support wayback replay if timestamp is provided
- when proxying to an existing web archive, remove the web archive prefix from the redirect URL to avoid double-adding the redirect
- fix parsing of inline attributes: parse if starts with 'javascript:' or property name starts with on*
- rewrite: replace newlines for inline attr before acorn parse, and also after wrap
- tests: add tests for inline attribute parsing, including wrapping
bump to 2.16.14
@ikreymer ikreymer merged commit 3b867eb into main Jan 20, 2024
2 checks passed
@ikreymer ikreymer deleted the rw-fix-globals branch June 21, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wombat's addition to JavaScript file causing syntax error
1 participant