ua-parser / uap-core

The regex file necessary to build language ports of Browserscope's user agent parser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User agent with parentheses

sss13579 opened this issue · comments

If device in user agent string has parentheses, then device model and family are cut by closing parenthesis

Examples:
"Dalvik/2.1.0 (Linux; U; Android 8.0.0; moto g(6) play Build/OPPS27.91-177-2)" - Device="moto g(6"
"Dalvik/2.1.0 (Linux; U; Android 8.1.0; LM-X210(G) Build/OPM1.171019.026)" - Device="LM-X210(G"
"Dalvik/2.1.0 (Linux; U; Android 8.1.0; LM-Q610(FGN) Build/OPM1.171019.019)" - Device="LM-Q610(FGN"

I think you should sanitize your input to strip-off the quotes. If you have checked that the quotes are part of the UA-String and are not introduced by your system please consider contributing with a PR.