Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Frontend/src/components/admin/events/EventModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ export default function EventModal({ setIsModalOpen, editingEvent }) {
const doc = new DOMParser().parseFromString(html, "text/html");
return doc.body.textContent || "";
} catch {
return html.replace(/<[^>]+>/g, ""); // fallback
let previous = "";
let current = html;
while (current !== previous) {
previous = current;
current = current.replace(/<[^>]*>/g, "");
}
return current;
}
};

Expand Down
16 changes: 8 additions & 8 deletions Frontend/src/data/content.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
"description": "The official CodeX flagship hackathon and screening initiative for SIH (Smart India Hackathon). A platform where the best ideas are forged under pressure.",
"website": "https://techthrive.qucodex.com",
"image": {
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676228/IMG_0627_rn1b2f_jgajho.jpg",
"assetKey": "ABOUT_FLAGSHIP_TECHTHRIVE",
"alt": "TechThrive"
}
},
Expand All @@ -271,7 +271,7 @@
"description": "A high-energy, fast-paced hackathon designed to push boundaries and build innovative solutions overnight.",
"website": "https://q-hackathon.qucodex.com",
"image": {
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676238/3R5A5324_mlzhos_rrm8qo.jpg",
"assetKey": "ABOUT_FLAGSHIP_QHACKATHON",
"alt": "Q-Hackathon"
}
},
Expand All @@ -282,7 +282,7 @@
"description": "Our premier coding festival featuring competitive programming, project expos, and technical challenges.",
"website": "https://techsprint.qucodex.com",
"image": {
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676229/IMG_0624_ixv8wd_x53ers.jpg",
"assetKey": "ABOUT_FLAGSHIP_TECHSPRINT",
"alt": "TechSprint"
}
}
Expand Down Expand Up @@ -321,23 +321,23 @@
],
"images": [
{
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676228/IMG_0627_rn1b2f_jgajho.jpg",
"assetKey": "ABOUT_COMMUNITY_1",
"alt": "Learn Together"
},
{
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676227/IMG_6902_oyq9by_tx5xar.jpg",
"assetKey": "ABOUT_COMMUNITY_2",
"alt": "Build Together"
},
{
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676231/IMG_0619_migrdi_tjbly3.jpg",
"assetKey": "ABOUT_COMMUNITY_3",
"alt": "Compete Together"
},
{
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676240/3R5A5331_iy1okp_l6kiza.jpg",
"assetKey": "ABOUT_COMMUNITY_4",
"alt": "Grow Together"
},
{
"src": "https://res.cloudinary.com/fswmfdcp/image/upload/v1787676238/IMG_5259_dwnhsr_jgso5d.jpg",
"assetKey": "ABOUT_COMMUNITY_5",
"alt": "Community"
}
]
Expand Down
6 changes: 3 additions & 3 deletions Frontend/src/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ export const optimizeCloudinaryUrl = (url, width = 1200) => {
parsedUrl.hostname !== "res.cloudinary.com" ||
parsedUrl.pathname.includes("/f_auto,")
) {
return url;
return parsedUrl.href;
}
return url.replace("/upload/", `/upload/f_auto,q_auto,w_${width}/`);
return parsedUrl.href.replace("/upload/", `/upload/f_auto,q_auto,w_${width}/`);
} catch {
return url;
return "";
}
};

Expand Down
Loading