Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rat Aint Tieba
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bing Chilling
Rat Aint Tieba
Commits
cc0e92d2
Commit
cc0e92d2
authored
1 year ago
by
Bing Chilling
Browse files
Options
Downloads
Patches
Plain Diff
Update app.py
parent
d49a9f4a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.py
+4
-1
4 additions, 1 deletion
app.py
with
4 additions
and
1 deletion
app.py
+
4
−
1
View file @
cc0e92d2
...
@@ -38,7 +38,10 @@ def normalize_utf8(s):
...
@@ -38,7 +38,10 @@ def normalize_utf8(s):
# Render the template with compatibility detection.
# Render the template with compatibility detection.
def
render_template_c
(
tmpl
,
**
kwargs
):
def
render_template_c
(
tmpl
,
**
kwargs
):
text_browsers
=
[
'
w3m
'
,
'
Lynx
'
,
'
ELinks
'
,
'
Links
'
,
'
URL/Emacs
'
,
'
Emacs
'
]
text_browsers
=
[
'
w3m
'
,
'
Lynx
'
,
'
ELinks
'
,
'
Links
'
,
'
URL/Emacs
'
,
'
Emacs
'
,
'
Mozilla/5.0 (compatible; hjdicks)
'
,
# abaco, mothra, etc
]
ua
=
request
.
headers
.
get
(
'
User-Agent
'
)
ua
=
request
.
headers
.
get
(
'
User-Agent
'
)
for
text_ua
in
text_browsers
:
for
text_ua
in
text_browsers
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment