Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OHR Support
Manage
Activity
Members
Labels
Plan
Issues
97
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Projects
OHR Support
Commits
8b7ee93f
Commit
8b7ee93f
authored
13 years ago
by
Felix Schäfer
Browse files
Options
Downloads
Plain Diff
Merge pull request
#124
from mbreit/bugfix/707-wiki-diff-encoding-error-ruby19
[#707] Fix encoding error on wiki diffs on Ruby 1.9
parents
03d956c3
60db8684
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models/wiki_content.rb
+6
-1
6 additions, 1 deletion
app/models/wiki_content.rb
with
6 additions
and
1 deletion
app/models/wiki_content.rb
+
6
−
1
View file @
8b7ee93f
...
...
@@ -104,7 +104,12 @@ class WikiContent < ActiveRecord::Base
def
text
@text
||=
case
changes
[
"compression"
]
when
"gzip"
Zlib
::
Inflate
.
inflate
(
changes
[
"data"
])
data
=
Zlib
::
Inflate
.
inflate
(
changes
[
"data"
])
if
data
.
respond_to?
:force_encoding
data
.
force_encoding
(
"UTF-8"
)
else
data
end
else
# uncompressed data
changes
[
"data"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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