File Support_the_wbr_element.patch of Package python-html5lib

Index: html5lib-1.1/html5lib/filters/sanitizer.py
===================================================================
--- html5lib-1.1.orig/html5lib/filters/sanitizer.py
+++ html5lib-1.1/html5lib/filters/sanitizer.py
@@ -128,6 +128,7 @@ allowed_elements = frozenset((
     (namespaces['html'], 'ul'),
     (namespaces['html'], 'var'),
     (namespaces['html'], 'video'),
+    (namespaces['html'], 'wbr'),
     (namespaces['mathml'], 'maction'),
     (namespaces['mathml'], 'math'),
     (namespaces['mathml'], 'merror'),
Index: html5lib-1.1/html5lib/constants.py
===================================================================
--- html5lib-1.1.orig/html5lib/constants.py
+++ html5lib-1.1/html5lib/constants.py
@@ -571,7 +571,8 @@ voidElements = frozenset([
     "col",
     "input",
     "source",
-    "track"
+    "track",
+    "wbr",
 ])
 
 cdataElements = frozenset(['title', 'textarea'])
Index: html5lib-1.1/html5lib/tests/test_sanitizer.py
===================================================================
--- html5lib-1.1.orig/html5lib/tests/test_sanitizer.py
+++ html5lib-1.1/html5lib/tests/test_sanitizer.py
@@ -49,6 +49,10 @@ def test_data_uri_disallowed_type():
     expected = "<audio controls></audio>"
     assert expected == sanitized
 
+def test_wbr_allowed():
+    sanitized = sanitize_html('<wbr>')
+    expected = '<wbr/>'
+    assert expected == sanitized
 
 def param_sanitizer():
     for ns, tag_name in sanitizer.allowed_elements:
openSUSE Build Service is sponsored by