Skip to content

Commit

Permalink
Fix vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
georg-stone committed Sep 11, 2024
1 parent a2f346c commit c60ec98
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/css/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ header {
max-width: 100%;
}

.feed-item img {
.feed-item .icon {
border-radius: 6px;
height: 20px;
}
Expand Down
10 changes: 7 additions & 3 deletions src/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ function areDatesOnTheSameDay(date1, date2) {
date1Parts.day === date2Parts.day;
}

function removeEscapeCharacters(str) {
return str.replaceAll("\\", "");
}

let feedsFailedToLoad = 0;

function fetchFeed(url) {
Expand Down Expand Up @@ -85,9 +89,9 @@ function fetchFeed(url) {
const span = document.createElement("span");
span.textContent = feedTitle;

const icon = document.createElement("img");
icon.src = `https://logo.clearbit.com/${url.split("/")[2]}`;
icon.height = 24;
const icon = document.createElement("img")
icon.src = `https://logo.clearbit.com/${encodeURIComponent(url.split("/")[2])}`
icon.className = "icon"

button.appendChild(icon);
button.appendChild(spacer);
Expand Down

0 comments on commit c60ec98

Please sign in to comment.