Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(back-end): improve the regex for post content
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Nov 15, 2022
1 parent 6647ac3 commit 0d0c049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common_back-end/constants/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ export const fileTypeDescription = "be a valid MIME type"
export const channelName = /^\w+$/u
export const channelNameDescription = "have alphanumeric or underscore characters only"

export const postContent = /^.*(?!<script.*?>.*?<\/script.*>)$/gmu
export const postContent = /^\b(?!.*<script.*?>.*?<\/script.*>.*).*$/gmu
export const postContentDescription = "have no banned tags"

0 comments on commit 0d0c049

Please sign in to comment.