Skip to content

Commit

Permalink
Merge pull request #3863 from 5e-Cleric/fix-reddit-link-generation-cr…
Browse files Browse the repository at this point in the history
…ashing-website-if-encodeURI-fails

Fix crashes if title is invalid as URI
  • Loading branch information
calculuschild authored Dec 16, 2024
2 parents 889f80f + 962a46a commit 4ab1a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/homebrew/pages/editPage/editPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ const EditPage = createClass({
**[Homebrewery Link](${global.config.publicUrl}/share/${shareLink})**`;

return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title.toWellFormed())}&text=${encodeURIComponent(text)}`;
},

renderNavbar : function(){
Expand Down

0 comments on commit 4ab1a22

Please sign in to comment.