@ecency/render-helper 2.5.1 → 2.5.2
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/node/index.cjs
CHANGED
|
@@ -488,7 +488,7 @@ function sanitizeHtml(html) {
|
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
}
|
|
491
|
-
var proxyBase = "https://
|
|
491
|
+
var proxyBase = "https://i.ecency.com";
|
|
492
492
|
var urlHashCache = new lruCache.LRUCache({ max: 500 });
|
|
493
493
|
function getUrlHash(url) {
|
|
494
494
|
const cached = urlHashCache.get(url);
|
|
@@ -531,6 +531,9 @@ function proxifyImageSrc(url, width = 0, height = 0, _format = "match") {
|
|
|
531
531
|
if (url.indexOf("https://steemitimages.com/") === 0 && url.indexOf("https://steemitimages.com/D") !== 0) {
|
|
532
532
|
return url.replace("https://steemitimages.com", proxyBase);
|
|
533
533
|
}
|
|
534
|
+
if (url.indexOf("https://images.ecency.com/") === 0) {
|
|
535
|
+
return url.replace("https://images.ecency.com", proxyBase);
|
|
536
|
+
}
|
|
534
537
|
const realUrl = getLatestUrl(url);
|
|
535
538
|
const pHash = extractPHash(realUrl);
|
|
536
539
|
const options = {
|
|
@@ -1487,7 +1490,7 @@ function linkify(content, forApp, renderOptions) {
|
|
|
1487
1490
|
const preceedings = (preceeding1 || "") + (preceeding2 || "");
|
|
1488
1491
|
if (userLower.indexOf("/") === -1 && isValidUsername(user)) {
|
|
1489
1492
|
if (!forApp) {
|
|
1490
|
-
const avatarSrc =
|
|
1493
|
+
const avatarSrc = `${getProxyBase()}/u/${userLower}/avatar/small`;
|
|
1491
1494
|
const html = `${preceedings}<a class="er-author er-author-link" href="/@${userLower}"><img class="er-author-link-image" src="${avatarSrc}" alt="${userLower}"/><span class="er-author-link-content"><span class="er-author-link-label">Hive account</span><span>@${userLower}</span></span></a>`;
|
|
1492
1495
|
const placeholder = `\u200C${authorPlaceholders.length}\u200C`;
|
|
1493
1496
|
authorPlaceholders.push({ placeholder, html });
|