Extended text masking function to include relevant HTMLElement (#1310)
* Extends maskTextFn to pass the HTMLElement to the deciding function --------- Authored-by: benjackwhite <benjackwhite@users.noreply.github.com> Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com> Co-authored-by: Eoghan Murray <eoghan@getthere.ie>
This commit is contained in:
@@ -575,7 +575,7 @@ function serializeTextNode(
|
||||
needMaskingText(n, maskTextClass, maskTextSelector)
|
||||
) {
|
||||
textContent = maskTextFn
|
||||
? maskTextFn(textContent)
|
||||
? maskTextFn(textContent, n.parentElement)
|
||||
: textContent.replace(/[\S]/g, '*');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user