Replacing one or multiple space-like characters with single space in actor description. Using logo thumbnails in descriptions.

This commit is contained in:
ThePendulum 2020-05-19 05:06:01 +02:00
parent 52ce2934ac
commit 6973d39cbd
6 changed files with 3 additions and 3 deletions

View File

@ -257,13 +257,13 @@
<router-link :to="{ name: 'network', params: { networkSlug: description.network.slug } }">
<img
v-if="description.site"
:src="`/img/logos/${description.network.slug}/${description.site.slug}.png`"
:src="`/img/logos/${description.network.slug}/thumbs/${description.site.slug}.png`"
class="description-logo"
>
<img
v-else
:src="`/img/logos/${description.network.slug}/network.png`"
:src="`/img/logos/${description.network.slug}/thumbs/network.png`"
class="description-logo"
>
</router-link>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -196,7 +196,7 @@ async function curateProfile(profile) {
update: profile.update,
};
curatedProfile.description = domPurify.sanitize(profile.description, { ALLOWED_TAGS: [] }).trim() || null;
curatedProfile.description = domPurify.sanitize(profile.description.replace(/\s+/g, ' '), { ALLOWED_TAGS: [] }).trim() || null;
const hasher = curatedProfile.description && blake2
.createHash('blake2b')