Skip to content

Commit

Permalink
Fix contenteditable attribute definition (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
bytestream committed Sep 12, 2022
1 parent dc27c78 commit f1d6da1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/HTMLPurifier/HTMLModule/CommonAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class HTMLPurifier_HTMLModule_CommonAttributes extends HTMLPurifier_HTMLModule
'class' => 'Class',
'id' => 'ID',
'title' => 'CDATA',
'contenteditable' => 'ContentEditable',
),
'Lang' => array(),
'I18N' => array(
Expand Down
7 changes: 7 additions & 0 deletions tests/HTMLPurifier/Strategy/ValidateAttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@ public function testRemovePercentCSSWidthAndHeightOnImg()
);
}

public function testContentEditableAttribute()
{
$this->assertResult(
'<div contenteditable="false"></div>',
'<div contenteditable="false"></div>'
);
}
}

// vim: et sw=4 sts=4

0 comments on commit f1d6da1

Please sign in to comment.