Skip to content

Commit

Permalink
fix: Fix an issue when importing file including image/svg+xml images …
Browse files Browse the repository at this point in the history
…causes validation error. Close #100 (#101)
  • Loading branch information
jessieweiyi authored Mar 15, 2024
1 parent 42e35b1 commit fbc6d88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/threat-composer/src/configs/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
******************************************************************************************************************** */
export const REGEX_CONTENT_NOT_HTML_TAG = /(<.*?>)/i;
export const REGEX_CONTENT_IMAGE_URL = /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/i;
export const REGEX_CONTENT_IMAGE_BASE64 = /^(?:data:image\/[a-z]{3,};base64,)(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/gi;
export const REGEX_CONTENT_IMAGE_BASE64 = /^(?:data:image\/[a-z+]{3,};base64,)(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/gi;

0 comments on commit fbc6d88

Please sign in to comment.