Merge pull request #737 from matrix-org/luke/fix-color-regex-strictness

Make COLOR_REGEX stricter
pull/21833/head
Luke Barnard 2017-03-03 17:49:12 +00:00 committed by GitHub
commit 9f6a5d11ae
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ emojione.imagePathSVG = 'emojione/svg/';
emojione.imageType = 'svg';
const EMOJI_REGEX = new RegExp(emojione.unicodeRegexp+"+", "gi");
const COLOR_REGEX = /#[0-9a-fA-F]{6}/;
const COLOR_REGEX = /^#[0-9a-fA-F]{6}$/;
/* modified from https://github.com/Ranks/emojione/blob/master/lib/js/emojione.js
* because we want to include emoji shortnames in title text