diff --git a/src/js/constants.js b/src/js/constants.js index 4f85d60d9..32da6235c 100644 --- a/src/js/constants.js +++ b/src/js/constants.js @@ -57,10 +57,10 @@ export const EVENT_ZOOM = 'zoom'; export const MIME_TYPE_JPEG = 'image/jpeg'; // RegExps -export const REGEXP_ACTIONS = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/; +export const REGEXP_ACTIONS = /^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/; export const REGEXP_DATA_URL = /^data:/; export const REGEXP_DATA_URL_JPEG = /^data:image\/jpeg;base64,/; -export const REGEXP_TAG_NAME = /^img|canvas$/i; +export const REGEXP_TAG_NAME = /^(img|canvas)$/i; // Misc // Inspired by the default width and height of a canvas element.