You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 7, 2023. It is now read-only.
# Check for a `valid HTML5 divid <https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute>`_.
272
+
defvalidate_divid(self, divid):
273
+
if (
274
+
# Per the spec, a divid must not contain `whitespace <https://infra.spec.whatwg.org/#ascii-whitespace>`_ (see also `Python string escape sequences <https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals>`_).
275
+
"\t"individ
276
+
or"\n"individ
277
+
or"\f"individ
278
+
or"\r"individ
279
+
or" "individ
280
+
or
281
+
# Also avoid characters that need escaping for CSS to avoid problems there.
282
+
"."individ
283
+
or"#"individ
284
+
or":"individ
285
+
or
286
+
# It must also be at least one character long. This is probably taken care of by the existence of ``self.arguments[0]``, but here's a bit of paranoia:
0 commit comments