@opentermsarchive/engine 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config/production.json
CHANGED
package/package.json
CHANGED
|
@@ -84,9 +84,12 @@ export async function filterHTML({ content, pageDeclaration }) {
|
|
|
84
84
|
|
|
85
85
|
// clean code from common changing patterns - initially for Windstream
|
|
86
86
|
domFragment.querySelectorAll('a[href*="/email-protection"]').forEach(node => {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
const newProtectedLink = webPageDOM.createElement('a');
|
|
88
|
+
const [href] = node.href.split('#');
|
|
89
|
+
|
|
90
|
+
newProtectedLink.href = href;
|
|
91
|
+
newProtectedLink.innerHTML = '[email protected]';
|
|
92
|
+
node.parentNode.replaceChild(newProtectedLink, node);
|
|
90
93
|
});
|
|
91
94
|
|
|
92
95
|
const markdownContent = transform(domFragment);
|
|
@@ -63,6 +63,7 @@ const rawHTMLWithCommonChangingItems = `
|
|
|
63
63
|
<p><a id="link3" href="http://absolute.url/link">link 3</a></p>
|
|
64
64
|
<p><a id="link4" href="">link 4</a></p>
|
|
65
65
|
<a href="/cdn-cgi/l/email-protection#3b4c52555f484f495e5a56154b49524d5a584215484f5a4f5e565e554f7b4c52555f484f495e5a5615585456">[email protected]</a>
|
|
66
|
+
<p><a href="/cdn-cgi/l/email-protection#2d4e4243594c4e596d4e4459545e4e424259034858">conta<span>[email protected]</span></a></p>
|
|
66
67
|
</body>
|
|
67
68
|
</html>`;
|
|
68
69
|
|
|
@@ -78,7 +79,9 @@ const expectedFilteredWithCommonChangingItems = `Title
|
|
|
78
79
|
|
|
79
80
|
link 4
|
|
80
81
|
|
|
81
|
-
[\\[email protected\\]](https://exemple.com/cdn-cgi/l/email-protection
|
|
82
|
+
[\\[email protected\\]](https://exemple.com/cdn-cgi/l/email-protection)
|
|
83
|
+
|
|
84
|
+
[\\[email protected\\]](https://exemple.com/cdn-cgi/l/email-protection)`;
|
|
82
85
|
/* eslint-enable no-irregular-whitespace */
|
|
83
86
|
|
|
84
87
|
const additionalFilter = {
|