Use `window` from Endpoint enum for anon view (#748)

Removes previously hardcoded "/window" from anon view links
main
invis-z 2022-05-11 06:06:57 +08:00 committed by GitHub
parent 194ddc33f3
commit 0f6226ce51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -520,7 +520,7 @@ def window():
# Use anonymous view for all links on page # Use anonymous view for all links on page
for a in results.find_all('a', {'href': True}): for a in results.find_all('a', {'href': True}):
a['href'] = '/window?location=' + a['href'] + ( a['href'] = f'{Endpoint.window}?location=' + a['href'] + (
'&nojs=1' if 'nojs' in request.args else '') '&nojs=1' if 'nojs' in request.args else '')
# Remove all iframes -- these are commonly used inside of <noscript> tags # Remove all iframes -- these are commonly used inside of <noscript> tags