Skip to content

Commit

Permalink
Merge pull request #167 from jobscore/allow-html-property-contentedit…
Browse files Browse the repository at this point in the history
…able

Allow HTML property: contenteditable
  • Loading branch information
flavorjones committed Sep 28, 2019
2 parents ffd695c + f70928c commit 6385822
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@
* Expand set of allowed CSS functions. [related to #122]
* Allow greater precision in shorthand CSS values. [#149] (Thanks, @danfstucky!)
* Allow CSS property `list-style` [#162] (Thanks, @jaredbeck!)
* Allow HTML property `contenteditable`


### Bug fixes
Expand Down
1 change: 1 addition & 0 deletions lib/loofah/html5/whitelist.rb
Expand Up @@ -243,6 +243,7 @@ module WhiteList
"cols",
"colspan",
"compact",
"contenteditable",
"coords",
"datetime",
"dir",
Expand Down
7 changes: 7 additions & 0 deletions test/html5/test_sanitizer.rb
Expand Up @@ -110,6 +110,13 @@ def test_should_allow_multi_word_data_attributes
check_sanitization(input, htmloutput, output, output)
end

def test_should_allow_contenteditable
input = '<p contenteditable="false">Hi!</p>'
output = '<p contenteditable="false">Hi!</p>'

check_sanitization(input, output, output, output)
end

##
## libxml2 downcases attributes, so this is moot.
##
Expand Down

0 comments on commit 6385822

Please sign in to comment.