Project

General

Profile

Actions

Bug #46865

closed

Email regular expression freezes whole frame in Chrome

Added by Michel Tremblay over 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2013-04-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using some long string as link text in the htmlarea editor, the browser window may freeze completely. (in Chrome only, ok in Firefox)

The text used to trigger the problem : "Ministère des Transports du Québec (Direction Saguenay-Lac-Saint-Jean-Chibougamau) et CSST"

I found out that the regex validation to detect email addresses is the cause of this problem.

As a quick patch, in htmlarea.js, line 4369, I replaced :

if (selection.anchorNode.data.match(HTMLArea.RE_email) && (a.href.match('mailto:' + selection.anchorNode.data.trim()))) {

by :

if (selection.anchorNode.data.indexOf('') !== -1 && selection.anchorNode.data.match(HTMLArea.RE_email) && (a.href.match('mailto:' + selection.anchorNode.data.trim()))) {@

This solves the problem for this particular case, but maybe the RE_email regex should be looked upon.

This could be related : http://stackoverflow.com/questions/12803859/regexp-and-string-combination-crashes-chrome

Actions

Also available in: Atom PDF