Bug #48810

Epic #55575: Streamline JavaScript Code in the TYPO3 Backend

Wrong escapeObjectId in t3lib/js/jsfunc.tceforms_suggest.js

Added by Stefan Terborg over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-06-04
Due date:
% Done:

0%

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

Description

The escape mechanism for the object id in the file t3lib/js/jsfunc.tceforms_suggest.js is wrong. The lines are:

escapeObjectId: function(objectId) {
    var escapedObjectId;
    escapedObjectId = objectId.replace(/:/g, '\\:');
    escapedObjectId = objectId.replace(/\./g, '\\.');
    escapedObjectId = objectId.replace(/\[/g, '\\[');
    escapedObjectId = objectId.replace(/\]/g, '\\]');
    return escapedObjectId;
}

which only escapes the closing square bracket. The lines should be:

escapeObjectId: function(objectId) {
    var escapedObjectId;
    escapedObjectId = objectId.replace(/:/g, '\\:');
    escapedObjectId = escapedObjectId.replace(/\./g, '\\.');
    escapedObjectId = escapedObjectId.replace(/\[/g, '\\[');
    escapedObjectId = escapedObjectId.replace(/\]/g, '\\]');
    return escapedObjectId;
}

#1

Updated by Daniel Siepmann over 7 years ago

  • Parent task set to #55575
  • Is Regression set to No
#2

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from New to Closed

I am closing the ticket for the following reasons:

1) Version 4.5 is not maintained anymore;
2) The lines mentioned in this ticket don't exist anymore in 6.2.12 (file has been moved to typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.tceforms_suggest.js);
3) the method that replaced this code is placed in typo3/sysext/backend/Resources/Public/JavaScript/jsfunc.inline.js and looks different

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Also available in: Atom PDF