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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
7cbf5e4d
Commit
7cbf5e4d
authored
Sep 05, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent result of SyntaxHighlightFilter being sanitized
parent
b2f3d024
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lib/gitlab/markdown/sanitization_filter.rb
lib/gitlab/markdown/sanitization_filter.rb
+8
-4
No files found.
lib/gitlab/markdown/sanitization_filter.rb
View file @
7cbf5e4d
...
...
@@ -67,12 +67,16 @@ module Gitlab
def
clean_spans
lambda
do
|
env
|
return
unless
env
[
:node_name
]
==
'span'
return
unless
env
[
:node
].
has_attribute?
(
'class'
)
node
=
env
[
:node
]
unless
has_ancestor?
(
env
[
:node
],
'pre'
)
env
[
:node
].
remove_attribute
(
'class'
)
return
unless
node
.
name
==
'span'
return
unless
node
.
has_attribute?
(
'class'
)
unless
has_ancestor?
(
node
,
'pre'
)
node
.
remove_attribute
(
'class'
)
end
{
node_whitelist:
[
node
]}
end
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