Skip to content

Commit

Permalink
Merge pull request #1041 from Vyvy-vi/fix/update-length-issue
Browse files Browse the repository at this point in the history
fix: update length limit on plainText
  • Loading branch information
CarlosQ96 authored Jun 28, 2023
2 parents bf7474e + afac2ab commit 18e42e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resolvers/projectResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ export class ProjectResolver {
i18n.__(translationErrorMessagesKeys.AUTHENTICATION_REQUIRED),
);

if (content?.length > PROJECT_UPDATE_CONTENT_MAX_LENGTH) {
if (content?.replace(/<[^>]+>/g, '').length > PROJECT_UPDATE_CONTENT_MAX_LENGTH) {
throw new Error(
i18n.__(
translationErrorMessagesKeys.PROJECT_UPDATE_CONTENT_LENGTH_SIZE_EXCEEDED,
Expand Down Expand Up @@ -1398,7 +1398,7 @@ export class ProjectResolver {
i18n.__(translationErrorMessagesKeys.AUTHENTICATION_REQUIRED),
);

if (content?.length > PROJECT_UPDATE_CONTENT_MAX_LENGTH) {
if (content?.replace(/<[^>]+>/g, '').length > PROJECT_UPDATE_CONTENT_MAX_LENGTH) {
throw new Error(
i18n.__(
translationErrorMessagesKeys.PROJECT_UPDATE_CONTENT_LENGTH_SIZE_EXCEEDED,
Expand Down

0 comments on commit 18e42e7

Please sign in to comment.