diff --git a/core/includes/form.inc b/core/includes/form.inc
index 4b188bc..e3f1ec8 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -4662,6 +4662,23 @@ function theme_form($variables) {
 }
 
 /**
+ * Preprocess variables for a form.
+ */
+function template_preprocess_form(&$variables) {
+  $element = $variables['element'];
+  if (isset($element['#action'])) {
+    $element['#attributes']['action'] = drupal_strip_dangerous_protocols($element['#action']);
+  }
+  element_set_attributes($element, array('method', 'id'));
+  if (empty($element['#attributes']['accept-charset'])) {
+    $element['#attributes']['accept-charset'] = "UTF-8";
+  }
+
+  $variables['children'] = $element['#children'];
+  $variables['attributes'] = new Attribute($element['#attributes']);
+}
+
+/**
  * Returns HTML for a textarea form element.
  *
  * @param $variables
diff --git a/core/themes/stark/templates/form.inc/form.html.twig b/core/themes/stark/templates/form.inc/form.html.twig
new file mode 100644
index 0000000..52a467d
--- /dev/null
+++ b/core/themes/stark/templates/form.inc/form.html.twig
@@ -0,0 +1,19 @@
+{#
+/**
+ * @file
+ * Default theme implementation for a form.
+ *
+ * Available variables:
+ * - attributes: An associative array containing properties of the element.
+ * - children: Rendered children elements.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_form()
+ *
+ * @ingroup themeable
+ */
+#}
+<form class="{{ attributes.class }}" {{- attributes }}>
+  {# Anonymous DIV to satisfy XHTML compliance. #}
+  <div>{{ children }}</div>
+</form>
