tinyMCE try validation in Cyrillic

tinyMCE try validation in Cyrillic


I use jquery validation plugin. All is well.. Take data from the editor tinyMCE and filter it - all html tags
with javascript function  strip_tags(), analogue php.

After I made clear the contents of the text of the tag needs to do a new filtering.
Just new filtering the resulting text.

  1. $.validator.addMethod(
  2. "regex",
  3. function(value, element, regexp) {
  4. var editorContent = strip_tags(tinyMCE.get('content').getContent());
  5. //alert(editorContent);
  6. var re = new RegExp(regexp);
  7. return this.optional(element) || re.test(value);
  8. });

I do not know how to pass argument ( editorContent ) to  var re = new RegExp(regexp);