f796dd
diff --git a/src/lxml/html/defs.py b/src/lxml/html/defs.py
f796dd
index caf6b21..ea3c016 100644
f796dd
--- a/src/lxml/html/defs.py
f796dd
+++ b/src/lxml/html/defs.py
f796dd
@@ -21,6 +21,8 @@ link_attrs = frozenset([
f796dd
     'usemap',
f796dd
     # Not standard:
f796dd
     'dynsrc', 'lowsrc',
f796dd
+    # HTML5 formaction
f796dd
+    'formaction'
f796dd
     ])
f796dd
 
f796dd
 # Not in the HTML 4 spec:
f796dd
diff --git a/src/lxml/html/tests/test_clean.py b/src/lxml/html/tests/test_clean.py
f796dd
index 451eec2..e40cdad 100644
f796dd
--- a/src/lxml/html/tests/test_clean.py
f796dd
+++ b/src/lxml/html/tests/test_clean.py
f796dd
@@ -89,6 +89,21 @@ class CleanerTest(unittest.TestCase):
f796dd
             b'<math><style>/* deleted */</style></math>',
f796dd
             lxml.html.tostring(clean_html(s)))
f796dd
 
f796dd
+    def test_formaction_attribute_in_button_input(self):
f796dd
+        # The formaction attribute overrides the form's action and should be
f796dd
+        # treated as a malicious link attribute
f796dd
+        html = ('<form id="test"><input type="submit" formaction="javascript:alert(1)"></form>'
f796dd
+        '<button form="test" formaction="javascript:alert(1)">X</button>')
f796dd
+        expected = ('
<form id="test"><input type="submit" formaction=""></form>'
f796dd
+        '<button form="test" formaction="">X</button>')
f796dd
+        cleaner = Cleaner(
f796dd
+            forms=False,
f796dd
+            safe_attrs_only=False,
f796dd
+        )
f796dd
+        self.assertEqual(
f796dd
+            expected,
f796dd
+            cleaner.clean_html(html))
f796dd
+
f796dd
 
f796dd
 def test_suite():
f796dd
     suite = unittest.TestSuite()