mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-04 12:58:50 +00:00
Merge pull request #338 from helsinki-systems/escape-css-selectors
fix(calendar(js)): escape CSS selector names (@leonklingele)
This commit is contained in:
19
UI/WebServerResources/js/Common/cssescape.filter.js
Normal file
19
UI/WebServerResources/js/Common/cssescape.filter.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
|
||||
/**
|
||||
* @type {angular.Module}
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
cssEscape.$inject = ['$window'];
|
||||
function cssEscape($window) {
|
||||
return $window.CSS.escape;
|
||||
}
|
||||
|
||||
angular.module('SOGo.Common')
|
||||
.filter('cssEscape', cssEscape);
|
||||
})();
|
||||
@@ -26,11 +26,11 @@
|
||||
template: [
|
||||
'<style type="text/css">',
|
||||
/* Background color */
|
||||
' .bg-category{{ ngModel.id }} {',
|
||||
' .bg-category{{ ngModel.id | cssEscape }} {',
|
||||
' background-color: {{ ngModel.color }} !important;',
|
||||
' }',
|
||||
/* Border color */
|
||||
' .bdr-category{{ ngModel.id }} {',
|
||||
' .bdr-category{{ ngModel.id | cssEscape }} {',
|
||||
' border-color: {{ ngModel.color }} !important;',
|
||||
' }',
|
||||
'</style>'
|
||||
|
||||
Reference in New Issue
Block a user