@adobe/helix-importer 2.8.4 → 2.8.5
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.8.5](https://github.com/adobe/helix-importer/compare/v2.8.4...v2.8.5) (2023-03-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* catch invalid link decoding ([7eedc30](https://github.com/adobe/helix-importer/commit/7eedc30aefff48407c537b285c6f00762afef11a))
|
|
7
|
+
|
|
1
8
|
## [2.8.4](https://github.com/adobe/helix-importer/compare/v2.8.3...v2.8.4) (2023-03-14)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -116,8 +116,8 @@ export default class PageImporter {
|
|
|
116
116
|
const as = document.querySelectorAll('a');
|
|
117
117
|
as.forEach((a) => {
|
|
118
118
|
const { href } = a;
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
try {
|
|
120
|
+
if ((href && href !== '' && contents.indexOf(href) !== -1) || contents.indexOf(decodeURI(href)) !== -1) {
|
|
121
121
|
const u = new URL(href, url);
|
|
122
122
|
const ext = path.extname(u.href);
|
|
123
123
|
if (ext === '.mp4') {
|
|
@@ -127,9 +127,9 @@ export default class PageImporter {
|
|
|
127
127
|
append: '#image.mp4',
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
} catch (error) {
|
|
131
|
-
this.logger.warn(`Invalid link in the page: ${href}`, error);
|
|
132
130
|
}
|
|
131
|
+
} catch (error) {
|
|
132
|
+
this.logger.warn(`Invalid link in the page - ${href}`, error);
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
<p><a href="http://wwww.sample.com/a">Link on a single online</a></p>
|
|
5
5
|
<a href="http://wwww.sample.com/b">Link without p</a>
|
|
6
6
|
<p>http://wwww.sample.com/c</p>
|
|
7
|
+
<a href="https://www.sample.com/app/answers/detail/a_id/17414//~/axon%E2%84%A2-pclamp%E2%AE-and-digidata%E2%84%A2%3A-operating-system-compatibility#:\\~:text=Digidata%201440%2C%201550%2C%201550A%2C,supported%20up%20to%20pCLAMP%2010.3.&text=MiniDigi%201B%20is%20required%20for%20use%20under%2064%2Dbit%20Operating%20Systems.&text=pCLAMP%209%20software%20is%20not,or%2064%2Dbit%20versions">Weird link</a>
|
|
7
8
|
</body>
|
|
8
9
|
</html>
|
|
@@ -4,4 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
[Link without p](http://wwww.sample.com/b)
|
|
6
6
|
|
|
7
|
-
http://wwww.sample.com/c
|
|
7
|
+
http://wwww.sample.com/c
|
|
8
|
+
|
|
9
|
+
[Weird link](https://www.sample.com/app/answers/detail/a_id/17414//\~/axon%E2%84%A2-pclamp%E2%AE-and-digidata%E2%84%A2%3A-operating-system-compatibility#:\\\\\~:text=Digidata%201440%2C%201550%2C%201550A%2C,supported%20up%20to%20pCLAMP%2010.3.\&text=MiniDigi%201B%20is%20required%20for%20use%20under%2064%2Dbit%20Operating%20Systems.\&text=pCLAMP%209%20software%20is%20not,or%2064%2Dbit%20versions)
|