[FIX] mail: replace special characters
When the delimiter '@' is used in the composer, a regular expression is
built in order to suggest followers. However, if this regular expression
is incorrect, it causes a crash since RegExp will throw a syntax error.
Since a new regular expression is built for each new character the user
types, this situation can occur very easily. For example, typing '@('
will cause a crash.
This fix replaces characters which may easily lead to a syntax error by
a space.
This commit is contained in:
@@ -23,6 +23,7 @@ var accented_letters_mapping = {
|
||||
'oe': 'œ',
|
||||
'u': '[ùúûűü]',
|
||||
'y': '[ýÿ]',
|
||||
' ': '[()\\[\\]]',
|
||||
};
|
||||
|
||||
// The MentionManager allows the Composer to register listeners. For each
|
||||
|
||||
Reference in New Issue
Block a user