Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
8b7ee93f
Commit
8b7ee93f
authored
Nov 25, 2011
by
Felix Schäfer
Browse files
Options
Browse Files
Download
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
wiki_content.rb
app/models/wiki_content.rb
+6
-1
No files found.
app/models/wiki_content.rb
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"
]
...
...
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