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
iv
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
Hide 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
...
@@ -67,12 +67,16 @@ module Gitlab
def
clean_spans
def
clean_spans
lambda
do
|
env
|
lambda
do
|
env
|
return
unless
env
[
:node_name
]
==
'span'
node
=
env
[
:node
]
return
unless
env
[
:node
].
has_attribute?
(
'class'
)
unless
has_ancestor?
(
env
[
:node
],
'pre'
)
return
unless
node
.
name
==
'span'
env
[
:node
].
remove_attribute
(
'class'
)
return
unless
node
.
has_attribute?
(
'class'
)
unless
has_ancestor?
(
node
,
'pre'
)
node
.
remove_attribute
(
'class'
)
end
end
{
node_whitelist:
[
node
]}
end
end
end
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