mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-1256] fix: accept image as a valid comment (#4409)
* fix: accept image as a valid comment * fix: update space app helper function
This commit is contained in:
parent
d8ab3e0087
commit
3a66986785
@ -52,7 +52,7 @@ export const checkEmailValidity = (email: string): boolean => {
|
|||||||
|
|
||||||
export const isEmptyHtmlString = (htmlString: string) => {
|
export const isEmptyHtmlString = (htmlString: string) => {
|
||||||
// Remove HTML tags using regex
|
// Remove HTML tags using regex
|
||||||
const cleanText = DOMPurify.sanitize(htmlString, { ALLOWED_TAGS: [] });
|
const cleanText = DOMPurify.sanitize(htmlString, { ALLOWED_TAGS: ["img"] });
|
||||||
// Trim the string and check if it's empty
|
// Trim the string and check if it's empty
|
||||||
return cleanText.trim() === "";
|
return cleanText.trim() === "";
|
||||||
};
|
};
|
||||||
|
@ -174,10 +174,10 @@ export const getFetchKeysForIssueMutation = (options: {
|
|||||||
const ganttFetchKey = cycleId
|
const ganttFetchKey = cycleId
|
||||||
? { ganttFetchKey: CYCLE_ISSUES_WITH_PARAMS(cycleId.toString(), ganttParams) }
|
? { ganttFetchKey: CYCLE_ISSUES_WITH_PARAMS(cycleId.toString(), ganttParams) }
|
||||||
: moduleId
|
: moduleId
|
||||||
? { ganttFetchKey: MODULE_ISSUES_WITH_PARAMS(moduleId.toString(), ganttParams) }
|
? { ganttFetchKey: MODULE_ISSUES_WITH_PARAMS(moduleId.toString(), ganttParams) }
|
||||||
: viewId
|
: viewId
|
||||||
? { ganttFetchKey: VIEW_ISSUES(viewId.toString(), viewGanttParams) }
|
? { ganttFetchKey: VIEW_ISSUES(viewId.toString(), viewGanttParams) }
|
||||||
: { ganttFetchKey: PROJECT_ISSUES_LIST_WITH_PARAMS(projectId?.toString() ?? "", ganttParams) };
|
: { ganttFetchKey: PROJECT_ISSUES_LIST_WITH_PARAMS(projectId?.toString() ?? "", ganttParams) };
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...ganttFetchKey,
|
...ganttFetchKey,
|
||||||
@ -230,7 +230,7 @@ export const checkEmailValidity = (email: string): boolean => {
|
|||||||
|
|
||||||
export const isEmptyHtmlString = (htmlString: string) => {
|
export const isEmptyHtmlString = (htmlString: string) => {
|
||||||
// Remove HTML tags using regex
|
// Remove HTML tags using regex
|
||||||
const cleanText = DOMPurify.sanitize(htmlString, { ALLOWED_TAGS: [] });
|
const cleanText = DOMPurify.sanitize(htmlString, { ALLOWED_TAGS: ["img"] });
|
||||||
// Trim the string and check if it's empty
|
// Trim the string and check if it's empty
|
||||||
return cleanText.trim() === "";
|
return cleanText.trim() === "";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user