diff --git a/configdoc/usage.xml b/configdoc/usage.xml
index c0d47081..beab30c2 100644
--- a/configdoc/usage.xml
+++ b/configdoc/usage.xml
@@ -410,7 +410,7 @@
- 105
+ 109
diff --git a/library/HTMLPurifier/HTMLModule/SafeScripting.php b/library/HTMLPurifier/HTMLModule/SafeScripting.php
index 0330cd97..93d0966f 100644
--- a/library/HTMLPurifier/HTMLModule/SafeScripting.php
+++ b/library/HTMLPurifier/HTMLModule/SafeScripting.php
@@ -23,7 +23,7 @@ class HTMLPurifier_HTMLModule_SafeScripting extends HTMLPurifier_HTMLModule
$script = $this->addElement(
'script',
'Inline',
- 'Empty',
+ 'Optional:', // Not `Empty` to not allow to autoclose the tag @see https://www.w3.org/TR/html4/interact/scripts.html
null,
array(
// While technically not required by the spec, we're forcing
diff --git a/tests/HTMLPurifier/HTMLModule/SafeScriptingTest.php b/tests/HTMLPurifier/HTMLModule/SafeScriptingTest.php
index 20972975..17c0763a 100644
--- a/tests/HTMLPurifier/HTMLModule/SafeScriptingTest.php
+++ b/tests/HTMLPurifier/HTMLModule/SafeScriptingTest.php
@@ -20,7 +20,15 @@ class HTMLPurifier_HTMLModule_SafeScriptingTest extends HTMLPurifier_HTMLModuleH
public function testGood()
{
$this->assertResult(
- ''
+ ''
+ );
+ }
+
+ public function testGoodWithAutoclosedTag()
+ {
+ $this->assertResult(
+ '',
+ ''
);
}