Skip to content

Commit

Permalink
Merge pull request #177 from poap-xyz/release/v1.10.1
Browse files Browse the repository at this point in the history
Release v1.10.1
  • Loading branch information
jm42 authored Apr 7, 2024
2 parents df7848b + 66b21b5 commit e847d11
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions netlify/edge-functions/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ async function getEventInfo(eventId) {
function replaceMeta(html, title, description, image, url) {
return html
.replace(/<title>([^<]+)<\/title>/, `<title>$1: ${title}</title>`)
.replace(/<meta property="([^:]+):title" content="[^"]+" \/>/g, `<meta property="$1:title" content="${title}" />`)
.replace(/<meta name="description" content="[^"]+" \/>/, `<meta name="description" content="${description}" />`)
.replace(/<meta property="([^:]+):description" content="[^"]+" \/>/g, `<meta property="$1:description" content="${description}" />`)
.replace(/<meta property="([^:]+):image" content="[^"]+" \/>/g, `<meta property="$1:image" content="${image}" />`)
.replace(/<meta property="([^:]+):url" content="[^"]+" \/>/g, `<meta property="$1:url" content="${url}" />`)
.replace(/<meta property="([^:]+):title" content="[^"]+" ?\/>/g, `<meta property="$1:title" content="${title}"/>`)
.replace(/<meta name="description" content="[^"]+" ?\/>/, `<meta name="description" content="${description}"/>`)
.replace(/<meta property="([^:]+):description" content="[^"]+" ?\/>/g, `<meta property="$1:description" content="${description}"/>`)
.replace(/<meta property="([^:]+):image" content="[^"]+" ?\/>/g, `<meta property="$1:image" content="${image}"/>`)
.replace(/<meta property="([^:]+):url" content="[^"]+" ?\/>/g, `<meta property="$1:url" content="${url}"/>`)
}

function escapeHtml(str) {
Expand Down
10 changes: 5 additions & 5 deletions netlify/edge-functions/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ async function getMetrics(eventIds) {
function replaceMeta(html, title, description, image, url) {
return html
.replace(/<title>([^<]+)<\/title>/, `<title>$1: ${title}</title>`)
.replace(/<meta property="([^:]+):title" content="[^"]+" \/>/g, `<meta property="$1:title" content="${title}" />`)
.replace(/<meta name="description" content="[^"]+" \/>/, `<meta name="description" content="${description}" />`)
.replace(/<meta property="([^:]+):description" content="[^"]+" \/>/g, `<meta property="$1:description" content="${description}" />`)
.replace(/<meta property="([^:]+):image" content="[^"]+" \/>/g, `<meta property="$1:image" content="${image}" />`)
.replace(/<meta property="([^:]+):url" content="[^"]+" \/>/g, `<meta property="$1:url" content="${url}" />`)
.replace(/<meta property="([^:]+):title" content="[^"]+" ?\/>/g, `<meta property="$1:title" content="${title}"/>`)
.replace(/<meta name="description" content="[^"]+" ?\/>/, `<meta name="description" content="${description}"/>`)
.replace(/<meta property="([^:]+):description" content="[^"]+" ?\/>/g, `<meta property="$1:description" content="${description}"/>`)
.replace(/<meta property="([^:]+):image" content="[^"]+" ?\/>/g, `<meta property="$1:image" content="${image}"/>`)
.replace(/<meta property="([^:]+):url" content="[^"]+" ?\/>/g, `<meta property="$1:url" content="${url}"/>`)
}

function escapeHtml(str) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@poap-xyz/poap-family",
"version": "1.10.0",
"version": "1.10.1",
"author": {
"name": "POAP",
"url": "https://poap.xyz"
Expand Down

0 comments on commit e847d11

Please sign in to comment.