BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
cc46a0d4
Commit
cc46a0d4
authored
Oct 19, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-escaping' into 'master'
fix: commit messages being double-escaped in activities tab See merge request !6937
parents
12f649fe
9c8c5e9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
CHANGELOG.md
CHANGELOG.md
+1
-0
html_entity_filter.rb
lib/banzai/filter/html_entity_filter.rb
+1
-1
html_entity_filter_spec.rb
spec/lib/banzai/filter/html_entity_filter_spec.rb
+5
-0
No files found.
CHANGELOG.md
View file @
cc46a0d4
...
...
@@ -122,6 +122,7 @@ Please view this file on the master branch, on stable branches it's out of date.
-
Cleanup Ci::ApplicationController. !6757 (Takuya Noguchi)
-
Fixes padding in all clipboard icons that have .btn class
-
Fix a typo in doc/api/labels.md
-
Fix double-escaping in activities tab (Alexandre Maia)
-
API: all unknown routing will be handled with 404 Not Found
-
Add docs for request profiling
-
Delete dynamic environments
...
...
lib/banzai/filter/html_entity_filter.rb
View file @
cc46a0d4
...
...
@@ -5,7 +5,7 @@ module Banzai
# Text filter that escapes these HTML entities: & " < >
class
HtmlEntityFilter
<
HTML
::
Pipeline
::
TextFilter
def
call
ERB
::
Util
.
html_escape
(
text
)
ERB
::
Util
.
html_escape
_once
(
text
)
end
end
end
...
...
spec/lib/banzai/filter/html_entity_filter_spec.rb
View file @
cc46a0d4
...
...
@@ -11,4 +11,9 @@ describe Banzai::Filter::HtmlEntityFilter, lib: true do
expect
(
output
).
to
eq
(
escaped
)
end
it
'does not double-escape'
do
escaped
=
ERB
::
Util
.
html_escape
(
"Merge branch 'blabla' into 'master'"
)
expect
(
filter
(
escaped
)).
to
eq
(
escaped
)
end
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