File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -163,21 +163,10 @@ def _get_nested_vulnerability(data, key_path=None):
163163 return data
164164
165165
166- def _sanitize_anchor_tags (text ):
167- if not text or not isinstance (text , str ):
168- return text
169- pattern = r'<a\s+[^>]*name=["\'][^"\']*["\'][^>]*>\s*</a>|<a\s+[^>]*name=["\'][^"\']*["\'][^>]*/>'
170- return re .sub (pattern , '' , text , flags = re .IGNORECASE )
171-
172-
173166def parse_vulnerability_from_dict (data , key_path = None , strict = False ):
174167 """Parse vulnerability from dict."""
175168 data = _get_nested_vulnerability (data , key_path )
176169
177- # Sanitize anchor tags from details field if present
178- if isinstance (data , dict ) and 'details' in data and data ['details' ]:
179- data ['details' ] = _sanitize_anchor_tags (data ['details' ])
180-
181170 try :
182171 jsonschema .validate (data , load_schema ())
183172 except jsonschema .exceptions .ValidationError as e :
You can’t perform that action at this time.
0 commit comments