@wiris/mathtype-ckeditor5 8.0.0 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin.js +3 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wiris/mathtype-ckeditor5",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "MathType Web for CKEditor5 editor",
5
5
  "keywords": [
6
6
  "chem",
package/src/plugin.js CHANGED
@@ -143,7 +143,7 @@ export default class MathType extends Plugin {
143
143
  view.bind('isEnabled').to(editor.commands.get('MathType'), 'isEnabled');
144
144
 
145
145
  view.set({
146
- label: StringManager.get('insert_math'),
146
+ label: StringManager.get('insert_math', editor.config.get('language')),
147
147
  icon: mathIcon,
148
148
  tooltip: true,
149
149
  });
@@ -169,7 +169,7 @@ export default class MathType extends Plugin {
169
169
  view.bind('isEnabled').to(editor.commands.get('ChemType'), 'isEnabled');
170
170
 
171
171
  view.set({
172
- label: StringManager.get('insert_chem'),
172
+ label: StringManager.get('insert_chem', editor.config.get('language')),
173
173
  icon: chemIcon,
174
174
  tooltip: true,
175
175
  });
@@ -254,12 +254,7 @@ export default class MathType extends Plugin {
254
254
  let formula = processor.toData(viewDocumentFragment) || '';
255
255
 
256
256
  // And obtain the complete formula
257
- formula = `<math${mathAttributes}>${formula}</math>`;
258
-
259
- // Skip if mathml contains a XSS injection
260
- if (Util.containsXSS(formula)) {
261
- return;
262
- }
257
+ formula = Util.htmlSanitize(`<math${mathAttributes}>${formula}</math>`);
263
258
 
264
259
  /* Model node that contains what's going to actually be inserted. This can be either:
265
260
  - A <mathml> element with a formula attribute set to the given formula, or