[otrs-cvs] ITSMConfigurationManagement/var/httpd/htdocs/js ITSM.Agent.ConfigItem.Search.js, 1.14, 1.15
"CVS commits notifications of OTRS.org" <[email protected]> Wed, 10 Jul 2013 17:17:59 +0000
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/ITSMConfigurationManagement/var/httpd/htdocs/js
In directory lancelot:/tmp/cvs-serv15123/var/httpd/htdocs/js
Modified Files:
ITSM.Agent.ConfigItem.Search.js
Log Message:
Improved escaping of colons (:) in HTML IDs by using Core.App.EscapeSelector function.
Author: ub
Index: ITSM.Agent.ConfigItem.Search.js
===================================================================
RCS file: /home/cvs/ITSMConfigurationManagement/var/httpd/htdocs/js/ITSM.Agent.ConfigItem.Search.js,v
retrieving revision 1.14
retrieving revision 1.15
diff -2 -u -d -r1.14 -r1.15
--- ITSM.Agent.ConfigItem.Search.js 1 Dec 2011 13:58:51 -0000 1.14
+++ ITSM.Agent.ConfigItem.Search.js 10 Jul 2013 17:17:54 -0000 1.15
@@ -1,5 +1,5 @@
// --
// ITSM.Agent.ConfigItem.Search.js - provides the special module functions for the global search
-// Copyright (C) 2001-2011 OTRS AG, http://otrs.org/\n";
+// Copyright (C) 2001-2013 OTRS AG, http://otrs.org/\n";
// --
// $Id$
@@ -53,7 +53,6 @@
TargetNS.SearchAttributeAdd = function (Attribute) {
- // escape :: with two leading backslashes in front of each :
- // this is necessary because jQuery can not handle a colon (:) in id attributes
- Attribute = Attribute.replace(/::/g, '\\:\\:');
+ // escape possible colons (:) in element id because jQuery can not handle it in id attribute selectors
+ Attribute = Core.App.EscapeSelector(Attribute);
var $Label = $('#SearchAttributesHidden label#Label' + Attribute);
@@ -82,8 +81,7 @@
$(this).prev().attr('id', InputID + 'Selected');
- // escape : with two leading backslashes in front of each :
- // this is necessary because jQuery can not handle a colon (:) in id attributes
- ITSM.Agent.CustomerSearch.Init($('#' + InputID.replace(/:/g, '\\:')), parseInt( Core.Config.Get('Autocomplete.Active'),10 ));
-
+ // escape possible colons (:) in element id because jQuery can not handle it in id attribute selectors
+ ITSM.Agent.CustomerSearch.Init($('#' + Core.App.EscapeSelector(InputID)), parseInt( Core.Config.Get('Autocomplete.Active'),10 ));
+
// prevent dialog closure when select a customer from the list
$('ul.ui-autocomplete').bind('click', function(Event) { Event.stopPropagation(); return false; });
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log