mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-04 23:22:42 +00:00
Replace with toWellFormed()
This commit is contained in:
@@ -380,15 +380,7 @@ const EditPage = createClass({
|
|||||||
|
|
||||||
**[Homebrewery Link](${global.config.publicUrl}/share/${shareLink})**`;
|
**[Homebrewery Link](${global.config.publicUrl}/share/${shareLink})**`;
|
||||||
|
|
||||||
let encodedTitle;
|
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title.toWellFormed())}&text=${encodeURIComponent(text)}`;
|
||||||
try {
|
|
||||||
encodedTitle = encodeURIComponent(title);
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error encoding title for Reddit link:", error);
|
|
||||||
encodedTitle = encodeURIComponent("Check out my homebrew!"); // Fallback title
|
|
||||||
}
|
|
||||||
|
|
||||||
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodedTitle}&text=${encodeURIComponent(text)}`;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
renderNavbar : function(){
|
renderNavbar : function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user