Skip to content

Commit

Permalink
Merge branch '1.x' into feature/SUL23-690
Browse files Browse the repository at this point in the history
  • Loading branch information
imonroe authored Jan 7, 2025
2 parents c829baa + 88b684e commit 69f4cda
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/node/stanford-news/page-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const StanfordNews = async ({node, ...props}: {node: NodeStanfordNews}) => {
timeZone: "America/Los_Angeles",
})

const encodeTitle = encodeURIComponent(node.title)

return (
<article {...props} className="centered mt-50">
<StanfordNewsMetadata node={node} />
Expand All @@ -50,7 +52,7 @@ const StanfordNews = async ({node, ...props}: {node: NodeStanfordNews}) => {
<NewsSocialLink
className="text-black transition-colors hocus:text-digital-blue"
prefix="https://twitter.com/intent/tweet?url="
suffix={`&text=${node.title}`}
suffix={`&text=${encodeTitle}`}
>
<span className="sr-only">Stanford Twitter</span>
<TwitterIcon />
Expand All @@ -60,7 +62,7 @@ const StanfordNews = async ({node, ...props}: {node: NodeStanfordNews}) => {
<NewsSocialLink
className="text-black transition-colors hocus:text-digital-blue"
prefix="https://www.linkedin.com/shareArticle?mini=true&url="
suffix={`&title=${node.title}`}
suffix={`&title=${encodeTitle}`}
>
<span className="sr-only">Stanford LinkedIn</span>
<LinkedInIcon />
Expand All @@ -69,7 +71,7 @@ const StanfordNews = async ({node, ...props}: {node: NodeStanfordNews}) => {
<li className="mr-1em">
<NewsSocialLink
className="text-black transition-colors hocus:text-digital-blue"
prefix={`mailto:?subject=${node.title}&body=`}
prefix={`mailto:?subject=${encodeTitle}&body=`}
>
<span className="sr-only">Forward Email</span>
<EnvelopeIcon title="Email" width={28} />
Expand Down

0 comments on commit 69f4cda

Please sign in to comment.