tui-calendar
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -1,2 +0,2 @@ | ||
// Type definitions for TOAST UI Calendar v1.14.0 | ||
// Type definitions for TOAST UI Calendar v1.14.1 | ||
// TypeScript Version: 3.2.1 | ||
@@ -3,0 +3,0 @@ |
{ | ||
"name": "tui-calendar", | ||
"author": "NHN FE Development Lab <dl_javascript@nhn.com>", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"main": "dist/tui-calendar.js", | ||
@@ -6,0 +6,0 @@ "types": "index.d.ts", |
@@ -302,4 +302,4 @@ # ![TOAST UI Calendar](https://user-images.githubusercontent.com/26706716/39230183-7f8ff186-48a0-11e8-8d9c-9699d2d0e471.png) | ||
* [tui-code-snippet](https://github.com/nhn/tui.code-snippet) >= 1.5.0 | ||
* [tui-date-picker](https://github.com/nhn/tui.date-picker) >= 4.0.2 is optional. | ||
* [tui-time-picker](https://github.com/nhn/tui.time-picker) >= 2.0.1 is optional. | ||
* [tui-date-picker](https://github.com/nhn/tui.date-picker) >= 4.3.0 is optional. | ||
* [tui-time-picker](https://github.com/nhn/tui.time-picker) >= 2.1.4 is optional. | ||
@@ -306,0 +306,0 @@ ## 🍞 TOAST UI Family |
@@ -7,2 +7,3 @@ /** | ||
var DOMPurify = require('dompurify'); | ||
var util = require('tui-code-snippet'); | ||
@@ -17,3 +18,20 @@ var Schedule = require('../model/schedule'); | ||
var SCHEDULE_VULNERABLE_OPTIONS = ['title', 'body', 'location', 'state', 'category', 'dueDateClass']; | ||
/** | ||
* Sanitize option values having possible vulnerabilities | ||
* @param {object} options options. | ||
* @returns {object} sanitized options. | ||
*/ | ||
function sanitizeOptions(options) { | ||
util.forEachArray(SCHEDULE_VULNERABLE_OPTIONS, function(prop) { | ||
if (options[prop]) { | ||
options[prop] = DOMPurify.sanitize(options[prop]); | ||
} | ||
}); | ||
return options; | ||
} | ||
/** | ||
* Get range date by custom timezone or native timezone | ||
@@ -163,3 +181,3 @@ * @param {Schedule} schedule The instance of schedule. | ||
scheduleData = { | ||
data: options | ||
data: sanitizeOptions(options) | ||
}; | ||
@@ -215,3 +233,3 @@ | ||
options = options || {}; | ||
options = options ? sanitizeOptions(options) : {}; | ||
@@ -218,0 +236,0 @@ if (['milestone', 'task', 'allday', 'time'].indexOf(options.category) > -1) { |
@@ -7,3 +7,2 @@ /** | ||
var DOMPurify = require('dompurify'); | ||
var util = require('tui-code-snippet'); | ||
@@ -243,3 +242,3 @@ var config = require('../../config'), | ||
vLayout.panels[0].container.innerHTML = DOMPurify.sanitize(tmpl(baseViewModel)); | ||
vLayout.panels[0].container.innerHTML = tmpl(baseViewModel); | ||
@@ -246,0 +245,0 @@ this._renderChildren(vLayout.panels[1].container, calendar, theme); |
@@ -7,3 +7,2 @@ /** | ||
var DOMPurify = require('dompurify'); | ||
var util = require('tui-code-snippet'); | ||
@@ -119,3 +118,3 @@ var config = require('../../config'), | ||
container.innerHTML = DOMPurify.sanitize(baseTmpl(baseViewModel)); | ||
container.innerHTML = baseTmpl(baseViewModel); | ||
@@ -131,3 +130,3 @@ scheduleContainer = domutil.find( | ||
scheduleContainer.innerHTML = DOMPurify.sanitize(scheduleTmpl(baseViewModel)); | ||
scheduleContainer.innerHTML = scheduleTmpl(baseViewModel); | ||
@@ -134,0 +133,0 @@ common.setAutoEllipsis( |
@@ -7,3 +7,2 @@ /** | ||
var DOMPurify = require('dompurify'); | ||
var util = require('tui-code-snippet'); | ||
@@ -157,3 +156,3 @@ var config = require('../../config'), | ||
container.innerHTML = DOMPurify.sanitize(baseTmpl(baseViewModel)); | ||
container.innerHTML = baseTmpl(baseViewModel); | ||
@@ -160,0 +159,0 @@ this.children.clear(); |
@@ -7,3 +7,2 @@ /** | ||
var DOMPurify = require('dompurify'); | ||
var util = require('tui-code-snippet'); | ||
@@ -43,3 +42,3 @@ var Weekday = require('../weekday'), | ||
container.innerHTML = DOMPurify.sanitize(tmpl(baseViewModel)); | ||
container.innerHTML = tmpl(baseViewModel); | ||
@@ -46,0 +45,0 @@ this.fire('afterRender', baseViewModel); |
@@ -7,3 +7,2 @@ /** | ||
var DOMPurify = require('dompurify'); | ||
var util = require('tui-code-snippet'); | ||
@@ -103,3 +102,3 @@ var config = require('../../config'); | ||
this.container.innerHTML = DOMPurify.sanitize(daynameTmpl(baseViewModel)); | ||
this.container.innerHTML = daynameTmpl(baseViewModel); | ||
}; | ||
@@ -106,0 +105,0 @@ |
@@ -7,3 +7,2 @@ /** | ||
var DOMPurify = require('dompurify'); | ||
var util = require('tui-code-snippet'); | ||
@@ -482,3 +481,3 @@ var config = require('../../config'); | ||
container.innerHTML = DOMPurify.sanitize(mainTmpl(baseViewModel)); | ||
container.innerHTML = mainTmpl(baseViewModel); | ||
@@ -516,3 +515,3 @@ /********** | ||
stickyContainer.innerHTML = DOMPurify.sanitize(timezoneStickyTmpl(baseViewModel)); | ||
stickyContainer.innerHTML = timezoneStickyTmpl(baseViewModel); | ||
@@ -519,0 +518,0 @@ stickyContainer.style.display = baseViewModel.timezones.length > 1 ? 'block' : 'none'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
5593040
46554