|
34 | 34 | "acronym": ["title"],
|
35 | 35 | }
|
36 | 36 |
|
37 |
| -#: List of allowed protocols |
| 37 | +#: Set of allowed protocols |
38 | 38 | ALLOWED_PROTOCOLS = frozenset(("http", "https", "mailto"))
|
39 | 39 |
|
40 | 40 | #: Invisible characters--0 to and including 31 except 9 (tab), 10 (lf), and 13 (cr)
|
@@ -101,7 +101,7 @@ def __init__(
|
101 | 101 | :arg dict attributes: allowed attributes; can be a callable, list or dict;
|
102 | 102 | defaults to ``bleach.sanitizer.ALLOWED_ATTRIBUTES``
|
103 | 103 |
|
104 |
| - :arg list protocols: allowed list of protocols for links; defaults |
| 104 | + :arg set protocols: set of allowed protocols for links; defaults |
105 | 105 | to ``bleach.sanitizer.ALLOWED_PROTOCOLS``
|
106 | 106 |
|
107 | 107 | :arg bool strip: whether or not to strip disallowed elements
|
@@ -279,7 +279,7 @@ def __init__(
|
279 | 279 | :arg dict attributes: allowed attributes; can be a callable, list or dict;
|
280 | 280 | defaults to ``bleach.sanitizer.ALLOWED_ATTRIBUTES``
|
281 | 281 |
|
282 |
| - :arg list allowed_protocols: allowed list of protocols for links; defaults |
| 282 | + :arg set allowed_protocols: set of allowed protocols for links; defaults |
283 | 283 | to ``bleach.sanitizer.ALLOWED_PROTOCOLS``
|
284 | 284 |
|
285 | 285 | :arg attr_val_is_uri: set of attributes that have URI values
|
@@ -476,7 +476,7 @@ def sanitize_uri_value(self, value, allowed_protocols):
|
476 | 476 | """Checks a uri value to see if it's allowed
|
477 | 477 |
|
478 | 478 | :arg value: the uri value to sanitize
|
479 |
| - :arg allowed_protocols: list of allowed protocols |
| 479 | + :arg allowed_protocols: set of allowed protocols |
480 | 480 |
|
481 | 481 | :returns: allowed value or None
|
482 | 482 |
|
|
0 commit comments