@vc-shell/framework 1.0.262 → 1.0.263

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.262",
3
+ "version": "1.0.263",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -61,9 +61,9 @@
61
61
  "devDependencies": {
62
62
  "@types/dompurify": "^3.0.5",
63
63
  "@types/quill": "^2.0.14",
64
- "@vc-shell/api-client-generator": "^1.0.262",
65
- "@vc-shell/config-generator": "^1.0.262",
66
- "@vc-shell/ts-config": "^1.0.262",
64
+ "@vc-shell/api-client-generator": "^1.0.263",
65
+ "@vc-shell/config-generator": "^1.0.263",
66
+ "@vc-shell/ts-config": "^1.0.263",
67
67
  "@vitejs/plugin-vue": "^5.0.3",
68
68
  "cypress-signalr-mock": "^1.5.0",
69
69
  "sass": "^1.69.6",
@@ -56,6 +56,7 @@
56
56
  import { QuillEditor } from "@vueup/vue-quill";
57
57
  import "@vueup/vue-quill/dist/vue-quill.snow.css";
58
58
  import { ref, unref, onMounted, onUpdated, getCurrentInstance, Ref } from "vue";
59
+ import DOMPurify from "dompurify";
59
60
  import ImageUploader from "quill-image-uploader";
60
61
  import { VcLabel, VcHint } from "../..";
61
62
 
@@ -78,7 +79,6 @@ export interface Emits {
78
79
  }
79
80
 
80
81
  const props = defineProps<Props>();
81
-
82
82
  const emit = defineEmits<Emits>();
83
83
  const uid = getCurrentInstance()?.uid;
84
84
  const id = `editor-${uid}`;
@@ -87,7 +87,6 @@ defineSlots<{
87
87
  error?: (props: any) => any;
88
88
  }>();
89
89
 
90
- // const content = ref();
91
90
  const quillRef = ref(null) as Ref<typeof QuillEditor | null>;
92
91
  const quill = ref();
93
92
 
@@ -147,7 +146,7 @@ onUpdated(() => {
147
146
  function initializeQuill() {
148
147
  quill.value = quillRef.value?.getQuill();
149
148
  if (props.modelValue) {
150
- quill.value.root.innerHTML = unref(props.modelValue);
149
+ quill.value.root.innerHTML = DOMPurify.sanitize(unref(props.modelValue));
151
150
  }
152
151
 
153
152
  quill.value.on("text-change", onTextChange);
@@ -171,7 +170,8 @@ function onTextChange() {
171
170
  if (quill.value.root.innerHTML === "<p><br></p>") {
172
171
  emit("update:modelValue", "");
173
172
  } else {
174
- emit("update:modelValue", quill.value.root.innerHTML);
173
+ const sanitizedContent = DOMPurify.sanitize(quill.value.root.innerHTML);
174
+ emit("update:modelValue", sanitizedContent);
175
175
  }
176
176
  }
177
177
  }