Commit rapidand script, truncate dom element name length to max 500 characters (#1316)
This commit is contained in:
@@ -668,6 +668,13 @@ def trim_element(element: dict) -> dict:
|
||||
if not element_text:
|
||||
del queue_ele["text"]
|
||||
|
||||
if (
|
||||
"attributes" in queue_ele
|
||||
and "name" in queue_ele["attributes"]
|
||||
and len(queue_ele["attributes"]["name"]) > 500
|
||||
):
|
||||
queue_ele["attributes"]["name"] = queue_ele["attributes"]["name"][:500]
|
||||
|
||||
if "beforePseudoText" in queue_ele and not queue_ele.get("beforePseudoText"):
|
||||
del queue_ele["beforePseudoText"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user