Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
019cdcd1
Commit
019cdcd1
authored
Apr 16, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that @valid_encoding is set
This attribute is read by the main_links template and needs to be set.
parent
82d16f75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
app/controllers/projects/wikis_controller.rb
app/controllers/projects/wikis_controller.rb
+3
-0
No files found.
app/controllers/projects/wikis_controller.rb
View file @
019cdcd1
...
...
@@ -10,6 +10,9 @@ class Projects::WikisController < Projects::ApplicationController
before_action
:authorize_admin_wiki!
,
only: :destroy
before_action
:load_project_wiki
before_action
:load_page
,
only:
[
:show
,
:edit
,
:update
,
:history
,
:destroy
]
before_action
only:
[
:show
,
:edit
,
:update
]
do
@valid_encoding
=
valid_encoding?
end
before_action
only:
[
:edit
,
:update
],
unless: :valid_encoding?
do
redirect_to
(
project_wiki_path
(
@project
,
@page
))
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment