forked from Qortal/q-support
Fixed Bug that allowed publishing issue with non-unique title if the title consisted only of characters that are filtered out when sanitized.
More references to Q-Share removed. Issue page has its routing change from /share to /issue Consent modal changed app name from Q-Share to Q-Support User can no longer block themselves Edit and Block buttons in IssueList.tsx no longer have tooltips. Instead, a description is in text visible when the button is loaded to make it easier to see both the button as a whole as well as what it does.
This commit is contained in:
@@ -128,8 +128,6 @@ export const PublishIssue = ({ editId, editContent }: NewCrowdfundProps) => {
|
||||
try {
|
||||
if (!categoryListRef.current) throw new Error("No CategoryListRef found");
|
||||
if (!userAddress) throw new Error("Unable to locate user address");
|
||||
|
||||
if (!title) throw new Error("Please enter a title");
|
||||
if (!description) throw new Error("Please enter a description");
|
||||
if (!categoryListRef.current?.getSelectedCategories()[0])
|
||||
throw new Error("Please select a category");
|
||||
@@ -157,18 +155,19 @@ export const PublishIssue = ({ editId, editContent }: NewCrowdfundProps) => {
|
||||
return;
|
||||
}
|
||||
|
||||
let fileReferences = [];
|
||||
|
||||
let listOfPublishes = [];
|
||||
|
||||
const fullDescription = extractTextFromHTML(description);
|
||||
|
||||
const sanitizeTitle = title
|
||||
.replace(/[^a-zA-Z0-9\s-]/g, "")
|
||||
.replace(/\s+/g, "-")
|
||||
.replace(/-+/g, "-")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
if (!sanitizeTitle) throw new Error("Please enter a title");
|
||||
|
||||
let fileReferences = [];
|
||||
|
||||
let listOfPublishes = [];
|
||||
|
||||
const fullDescription = extractTextFromHTML(description);
|
||||
|
||||
for (const publish of files) {
|
||||
const file = publish.file;
|
||||
|
||||
Reference in New Issue
Block a user