Skip to content

Commit

Permalink
Fixed issue #12159: On-page Regex validation shows incorrect behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Mar 6, 2017
1 parent c858372 commit 9ea8d19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/expressions/em_javascript.js
Expand Up @@ -384,8 +384,8 @@ function LEMregexMatch(sRegExp,within)
{
try {
var flags = sRegExp.replace(/.*\/([gimy]*)$/, '$1');
var pattern = sRegExp.replace(new RegExp('^/(.*?)/'+flags+'$'), '$1');
var reg = new RegExp(pattern, flags+'u');
var pattern = sRegExp.replace(new RegExp('^/(.*?)/'+flags+'$'), '$1').trim();
var reg = new RegExp(pattern, flags); // Note that the /u flag crashes IE11
return reg.test(within);
}
catch (err) {
Expand Down

0 comments on commit 9ea8d19

Please sign in to comment.