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

Bug fix: Make Opera browser recongizable #135

Merged
merged 1 commit into from
Jul 6, 2021

Conversation

patimatnazhm
Copy link
Contributor

@patimatnazhm patimatnazhm commented May 24, 2021

Description

I've re-ordered a BROWSERS tuple in user_sessions/templatetags/user_sessions.py and renamed the Opera browser in the tuple, that is supposed to be recognizable out of a user agent. Template filter device have been trying to recognize Opera browser by name Opera, while user agent detects it as OPR. Example of user agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 OPR/76.0.4017.123.

Motivation and Context

It fixes an open issue #134

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@patimatnazhm patimatnazhm changed the title Make Opera browser recongizable Bug fix: Make Opera browser recongizable May 24, 2021
Copy link
Collaborator

@Bouke Bouke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When Opera decided to ditch their own rendering engine (Presto) and jump on the WebKit train (later Blink) in 2013, they also start using a new User-Agent apparently. I guess we can stop trying to recognise such ancient browsers.

@Bouke Bouke merged commit 276ad84 into jazzband:master Jul 6, 2021
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.

2 participants