MCPcopy Create free account
hub / github.com/postlight/parser / cleanAttributes

Function cleanAttributes

src/utils/dom/clean-attributes.js:28–36  ·  view source on GitHub ↗
($article, $)

Source from the content-addressed store, hash-verified

26
27// Remove attributes like style or align
28export default function cleanAttributes($article, $) {
29 // Grabbing the parent because at this point
30 // $article will be wrapped in a div which will
31 // have a score set on it.
32 return removeAllButWhitelist(
33 $article.parent().length ? $article.parent() : $article,
34 $
35 );
36}

Callers 2

extractCleanNodeFunction · 0.90

Calls 1

removeAllButWhitelistFunction · 0.85

Tested by

no test coverage detected