Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
8ae9424e
Commit
8ae9424e
authored
Sep 22, 2018
by
kaniini
Browse files
html: default to using normal scrub policy if provided scrub policy is nil
parent
4cb63318
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/pleroma/html.ex
View file @
8ae9424e
...
...
@@ -12,17 +12,19 @@ def get_scrubbers() do
|>
get_scrubbers
end
def
filter_tags
(
html
,
scrubber
)
do
html
|>
Scrubber
.
scrub
(
scrubber
)
end
def
filter_tags
(
html
)
do
def
filter_tags
(
html
,
nil
)
do
get_scrubbers
()
|>
Enum
.
reduce
(
html
,
fn
scrubber
,
html
->
filter_tags
(
html
,
scrubber
)
end
)
end
def
filter_tags
(
html
,
scrubber
)
do
html
|>
Scrubber
.
scrub
(
scrubber
)
end
def
filter_tags
(
html
),
do
:
filter_tags
(
html
,
nil
)
def
strip_tags
(
html
)
do
html
|>
Scrubber
.
scrub
(
Scrubber
.
StripTags
)
end
...
...
Write
Preview
Supports
Markdown
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