Skip to content

Commit 9e23cbd

Browse files
committed
suggested changes
1 parent 452533c commit 9e23cbd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/views/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ export function renderProjectIndex(username: string, projectName: string) {
9999
<meta property="og:title" content="${projectName} by ${username} - p5.js Web Editor" />
100100
<meta property="og:description" content="A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners." />
101101
<meta property="og:image" content="https://editor.p5js.org/p5js-square-logo.png" />
102-
<meta property="og:url" content="https://editor.p5js.org/${username}/${projectName}" />
102+
<meta property="og:url" content="https://editor.p5js.org/${encodeURIComponent(
103+
username
104+
)}/${encodeURIComponent(projectName)}" />
103105
<meta property="og:type" content="website" />
104106
<meta name="twitter:card" content="summary" />
105107
<meta name="twitter:title" content="${projectName} by ${username} - p5.js Web Editor" />
106108
<meta name="twitter:description" content="A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners." />
107109
<meta name="twitter:image" content="https://editor.p5js.org/p5js-square-logo.png" />
108-
<title>${`${projectName} by ${username} -`}p5.js Web Editor</title>
110+
<title>${projectName} by ${username} - p5.js Web Editor</title>
109111
${
110112
process.env.NODE_ENV === 'production'
111113
? `<link rel='stylesheet' href='${assetsManifest['/app.css']}' />`

0 commit comments

Comments
 (0)