Skip to content

Commit 465007a

Browse files
committed
feat(vue/image): the image component supports binary stream base64 format
1 parent 3fe493e commit 465007a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/renderless/src/image/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export const mounted =
185185
}
186186

187187
export const filterImageUrl = (props) => () => {
188-
const isBase64 = /^data:image\/(png|jpg|jpeg|gif);base64,([a-zA-Z0-9+/]+={0,2})/
188+
const isBase64 = /^data:(image|application)\/(png|jpg|jpeg|gif|octet-stream);base64,([a-zA-Z0-9+/]+={0,2})/
189189

190190
return isBase64.test(props.src) ? props.src : xss.filterUrl(props.src)
191191
}

0 commit comments

Comments
 (0)