@postfetch/core 0.12.3 → 0.12.4
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/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/twitter.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -2361,7 +2361,7 @@ function cleanTwitterText(text, tweet) {
|
|
|
2361
2361
|
break;
|
|
2362
2362
|
text = text.slice(0, trailing.index).trimEnd();
|
|
2363
2363
|
}
|
|
2364
|
-
return text.replace(/&(?:gt|lt);/g, (entity) => entity === ">" ? ">" : "<");
|
|
2364
|
+
return text.replace(/&(?:amp|gt|lt);/g, (entity) => entity === "&" ? "&" : entity === ">" ? ">" : "<");
|
|
2365
2365
|
}
|
|
2366
2366
|
function needsFullText(tweet) {
|
|
2367
2367
|
if (noteText(tweet) || string(tweet.full_text)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postfetch/core",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4",
|
|
4
4
|
"description": "Zero-dependency typed core that turns Facebook, Instagram, LinkedIn, Pinterest, Reddit, SoundCloud, TikTok, X and YouTube post URLs into media files.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/twitter.ts
CHANGED
|
@@ -111,7 +111,7 @@ function cleanTwitterText(text: string | null, tweet: Json): string | null {
|
|
|
111
111
|
if (!trailing || !urls.has(trailing[1])) break;
|
|
112
112
|
text = text.slice(0, trailing.index).trimEnd();
|
|
113
113
|
}
|
|
114
|
-
return text.replace(/&(?:gt|lt);/g, (entity) => entity === ">" ? ">" : "<");
|
|
114
|
+
return text.replace(/&(?:amp|gt|lt);/g, (entity) => entity === "&" ? "&" : entity === ">" ? ">" : "<");
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function needsFullText(tweet: Json): boolean {
|