diff --git a/client/homebrew/navbar/account.navitem.jsx b/client/homebrew/navbar/account.navitem.jsx index 5f7424e25..bdc6d386a 100644 --- a/client/homebrew/navbar/account.navitem.jsx +++ b/client/homebrew/navbar/account.navitem.jsx @@ -70,7 +70,7 @@ const Account = createClass({ {global.account.username} diff --git a/client/homebrew/navbar/metadata.navitem.jsx b/client/homebrew/navbar/metadata.navitem.jsx index 435ad4491..6eadac367 100644 --- a/client/homebrew/navbar/metadata.navitem.jsx +++ b/client/homebrew/navbar/metadata.navitem.jsx @@ -32,7 +32,7 @@ const MetadataNav = createClass({ return <> {this.props.brew.authors.map((author, idx, arr)=>{ const spacer = arr.length - 1 == idx ? <> : , ; - return {author}{spacer}; + return {author}{spacer}; })} ; }, diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx index b4c455b88..b0c0d3aa9 100644 --- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx +++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx @@ -143,7 +143,7 @@ const BrewItem = ({ {author} - ) : ({author})} + ) : ({author})} {index < brew.authors.length - 1 && ', '} ))} diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index ed4ec39b4..595436c5b 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -119,6 +119,10 @@ const EditPage = (props)=>{ if(autoSaveEnabled) trySave(false, hasChange); }, [currentBrew]); + useEffect(()=>{ + trySave(true); + }, [saveGoogle]); + const handleSplitMove = ()=>{ editorRef.current?.update(); }; @@ -179,7 +183,6 @@ const EditPage = (props)=>{ const toggleGoogleStorage = ()=>{ setSaveGoogle((prev)=>!prev); setError(null); - trySave(true); }; const trySave = (immediate = false, hasChanges = true)=>{ diff --git a/client/homebrew/pages/errorPage/errors/errorIndex.js b/client/homebrew/pages/errorPage/errors/errorIndex.js index 89abd570f..b13f5230d 100644 --- a/client/homebrew/pages/errorPage/errors/errorIndex.js +++ b/client/homebrew/pages/errorPage/errors/errorIndex.js @@ -96,7 +96,7 @@ const errorIndex = (props)=>{ **Brew Title:** ${escape(props.brew.brewTitle) || 'Unable to show title'} - **Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'} + **Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${encodeURIComponent(author)})`;}).join(', ') || 'Unable to list authors'} [Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`, @@ -111,7 +111,7 @@ const errorIndex = (props)=>{ **Brew Title:** ${escape(props.brew.brewTitle) || 'Unable to show title'} - **Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'} + **Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${encodeURIComponent(author)})`;}).join(', ') || 'Unable to list authors'} [Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`, @@ -222,7 +222,7 @@ const errorIndex = (props)=>{ **Brew Title:** ${escape(props.brew.brewTitle)} - **Brew Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}`, + **Brew Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${encodeURIComponent(author)})`;}).join(', ') || 'Unable to list authors'}`, // ####### Admin page error ####### '52' : dedent`