Skip to content

Commit

Permalink
chore(sandside): upgrade scraphead to 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Marthym committed Aug 27, 2023
1 parent 68fcf96 commit b440f37
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<mapstruct.version>1.5.5.Final</mapstruct.version>
<nimbus-jose-jwt.version>9.31</nimbus-jose-jwt.version>
<noexception.version>1.9.0</noexception.version>
<scraphead.version>1.4.0</scraphead.version>
<scraphead.version>1.4.1</scraphead.version>
<testy-box.version>1.6.1</testy-box.version>
<ulid-creator.version>5.2.1</ulid-creator.version>
<unbescape.version>1.1.6.RELEASE</unbescape.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,23 @@ private RawNews handleMetaData(RawNews news, Metas metas) {
raw = raw.withTitle(metas.title());
}

if (!metas.errors().isEmpty()) {
metas.errors().forEach(e -> log.atDebug()
.addArgument(e.getLocalizedMessage())
.addArgument(news.link())
.setMessage("Error when parsing headers: {} on {}")
.log());
}
OpenGraph og = metas.og();
if (nonNull(og) && !og.isEmpty()) {
raw = Optional.ofNullable(og.title).map(raw::withTitle).orElse(raw);
raw = Optional.ofNullable(og.description).map(raw::withDescription).orElse(raw);
raw = Optional.ofNullable(og.image)
raw = Optional.ofNullable(og.title()).map(raw::withTitle).orElse(raw);
raw = Optional.ofNullable(og.description()).map(raw::withDescription).orElse(raw);
raw = Optional.ofNullable(og.image())
.filter(i -> SUPPORTED_SCHEMES.contains(i.getScheme()))
.map(raw::withImage).orElse(raw);
} else {
log.debug("No OG meta found for {}", news.link());
log.atDebug().addArgument(news.link())
.setMessage("No OG meta found for {}").log();
}

if (nonNull(links) && isNull(raw.image())) {
Expand Down
2 changes: 1 addition & 1 deletion seaside/src/techwatch/components/newslist/NewsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="flex flex-col h-full overflow-hidden">
<a class="font-semibold text-xl" target="_blank" :href="card.data.link" :title="card.data.link"
@auxclick="$emit('clickTitle')"
@click="$emit('clickTitle')" v-html="card.data.title"></a>
@click="$emit('clickTitle')" v-html="card.data.title"></a><!-- //NOSONAR typescript:S6299 String is sanitized on backend -->
<span v-html="card.data.description" class="mt-2 text-base flex-grow max-h-80 overflow-hidden"></span>
<div class="flex flex-row flex-wrap-reverse lg:justify-end text-xs mt-2">
Expand Down

0 comments on commit b440f37

Please sign in to comment.