Socket
Socket
Sign inDemoInstall

dijit

Package Overview
Dependencies
1
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.12.8 to 1.12.9

39

_editor/plugins/LinkDialog.js
define([
"require",
"dojo/_base/array",
"dojo/_base/declare", // declare

@@ -14,3 +15,3 @@ "dojo/dom-attr", // domAttr.get

"../range"
], function(require, declare, domAttr, keys, lang, on, has, query, string,
], function(require, array, declare, domAttr, keys, lang, on, has, query, string,
_Plugin, DropDownButton, rangeapi){

@@ -30,2 +31,17 @@

// allowUnsafeHtml: boolean
// If false (default), the link description will be filtered to prevent HTML content.
// If true no filtering is done, allowing for HTML content within the link element.
// The filter can be specified with the 'linkFilter' option.
allowUnsafeHtml: false,
// linkFilter: function or array of replacement pairs
// If 'allowUnsafeHtml' is false then this filter will be applied to the link Description value.
// function: the function will be invoked with the string value of the Description field and its
// return value will be used
// array: each array item should be an array of two values to pass to String#replace
linkFilter: [
[/</g, "&lt;"]
],
// Override _Plugin.buttonClass. This plugin is controlled by a DropDownButton

@@ -257,2 +273,12 @@ // (which triggers a TooltipDialog).

}
if(!this.allowUnsafeHtml && args && args.textInput){
if(typeof this.linkFilter === 'function'){
args.textInput = this.linkFilter(args.textInput);
}
else{
array.forEach(this.linkFilter, function (currentFilter) {
args.textInput = args.textInput.replace(currentFilter[0], currentFilter[1]);
});
}
}
return args;

@@ -635,4 +661,11 @@ },

// Register these plugins
_Plugin.registry["createLink"] = function(){
return new LinkDialog({command: "createLink"});
_Plugin.registry["createLink"] = function(args){
var pluginOptions = {
command: "createLink",
allowUnsafeHtml: ("allowUnsafeHtml" in args) ? args.allowUnsafeHtml : false
};
if("linkFilter" in args){
pluginOptions.linkFilter = args.linkFilter;
}
return new LinkDialog(pluginOptions);
};

@@ -639,0 +672,0 @@ _Plugin.registry["insertImage"] = function(){

2

bower.json

@@ -18,3 +18,3 @@ {

"dependencies": {
"dojo": "1.12.8"
"dojo": "1.12.9"
},

@@ -21,0 +21,0 @@ "devDependencies": {

{
"name": "dijit",
"version": "1.12.8",
"version": "1.12.9",
"directories": {

@@ -9,3 +9,3 @@ "lib": "."

"dependencies": {
"dojo": "1.12.8"
"dojo": "1.12.9"
},

@@ -12,0 +12,0 @@ "description": "Dijit provides a complete collection of user interface controls based on Dojo, giving you the power to create web applications that are highly optimized for usability, performance, internationalization, accessibility, but above all deliver an incredible user experience.",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc