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
46025ffb
Commit
46025ffb
authored
Oct 22, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
aa4007a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
sanitization_filter_spec.rb
spec/lib/gitlab/markdown/sanitization_filter_spec.rb
+4
-4
No files found.
spec/lib/gitlab/markdown/sanitization_filter_spec.rb
View file @
46025ffb
...
...
@@ -93,16 +93,16 @@ module Gitlab::Markdown
end
end
context
'when
pipeline is :description
'
do
context
'when
inline_sanitization is true
'
do
it
'uses a stricter whitelist'
do
doc
=
filter
(
'<h1>Description</h1>'
,
pipeline: :description
)
doc
=
filter
(
'<h1>Description</h1>'
,
inline_sanitization:
true
)
expect
(
doc
.
to_html
.
strip
).
to
eq
'Description'
end
%w(pre code img ol ul li)
.
each
do
|
elem
|
it
"removes '
#{
elem
}
' elements"
do
act
=
"<
#{
elem
}
>Description</
#{
elem
}
>"
expect
(
filter
(
act
,
pipeline: :description
).
to_html
.
strip
).
expect
(
filter
(
act
,
inline_sanitization:
true
).
to_html
.
strip
).
to
eq
'Description'
end
end
...
...
@@ -110,7 +110,7 @@ module Gitlab::Markdown
%w(b i strong em a ins del sup sub p)
.
each
do
|
elem
|
it
"still allows '
#{
elem
}
' elements"
do
exp
=
act
=
"<
#{
elem
}
>Description</
#{
elem
}
>"
expect
(
filter
(
act
,
pipeline: :description
).
to_html
).
to
eq
exp
expect
(
filter
(
act
,
inline_sanitization:
true
).
to_html
).
to
eq
exp
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