summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2022-04-07 19:17:52 -0400
committerLeonard Richardson <leonardr@segfault.org>2022-04-07 19:17:52 -0400
commitd8e5c8b975102d6567ed172190feacb8811a343f (patch)
treeeba22a9c1e9492032ad27612106c6f677a3cc43c /bs4/element.py
parent461a7083d2a924a9aaeadb8a8f6b47cf8b3fb511 (diff)
Omit untrusted input when issuing warnings.
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py
index 86123f8..74b1dc0 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -1992,7 +1992,7 @@ class Tag(PageElement):
has_key() is gone in Python 3, anyway.
"""
warnings.warn(
- 'has_key is deprecated. Use has_attr("%s") instead.' % key,
+ 'has_key is deprecated. Use has_attr(key) instead.',
DeprecationWarning
)
return self.has_attr(key)