Change all links to User Page to use encodeURIComponent

This commit is contained in:
G.Ambatte committed 2025-09-01 21:51:27 +12:00
1 parent c1ebc68cd4
commit 90de9c0af1
4 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@ const MetadataNav = createClass({
return <>
{this.props.brew.authors.map((author, idx, arr)=>{
const spacer = arr.length - 1 == idx ? <></> : <span>, </span>;
return <span key={idx}><a className='userPageLink' href={`/user/${author}`}>{author}</a>{spacer}</span>;
return <span key={idx}><a className='userPageLink' href={`/user/${encodeURIComponent(author)}`}>{author}</a>{spacer}</span>;
})}
</>;
},