stable

Clone or download

Read-only

request #13278: Remove direct usage of the v-html directive in Vue apps

v-html usages is replaced by a safer by default alternative. The goals are multiple: * make it easier to do the right thing for the developers: besides telling Vue to use the plugin at the instantiation of the app, the new directive can be used directly. There is no need of defining a new computed properties to sanize the value which means less boilerplate code. * reduce the number of points to inspect: only the directive/plugin code (and potentially a custom config at the init of the Vue app) instead of all the usages of v-html and the computed props associated with them. Note this does not means v-dompurify-html should be used everywhere, the usages should be limited where there is a real need for it and no alternative (same as v-html). No functionnal change is expected. vue-eslint-parser has been rollbacked to version 5.x. The 6.x version is not yet compatible with eslint-plugin-vue [0] causing false positives. It seems that major versions of vue-eslint-parser and eslint-plugin-vue must be kept in sync. [0] https://github.com/vuejs/eslint-plugin-vue/pull/807 Change-Id: Ibd599706cf3f6b19076841b4d7f330cab11e2e33

Modified Files

Name
M package-lock.json +22 −5 Go to diff View file
M package.json +1 −1 Go to diff View file
M plugins/create_test_env/scripts/call-me-back-burning-parrot/src/CallMeBack.vue +2 −7 Go to diff View file
M plugins/create_test_env/scripts/call-me-back-burning-parrot/src/index.js +3 −1 Go to diff View file
M plugins/create_test_env/scripts/call-me-back-flaming-parrot/src/CallMeBack.vue +2 −7 Go to diff View file
M plugins/create_test_env/scripts/call-me-back-flaming-parrot/src/index.js +3 −1 Go to diff View file
M plugins/create_test_env/scripts/package-lock.json +8 −0 Go to diff View file
M plugins/create_test_env/scripts/package.json +1 −1 Go to diff View file
M plugins/document/scripts/document/components/Folder/ItemDisplay/DisplayEmbeddedContent.vue +3 −4 Go to diff View file
M plugins/document/scripts/document/components/Folder/QuickLook/QuickLookDocumentPreview.vue +5 −7 Go to diff View file
M plugins/document/scripts/document/helpers/local-vue.js +2 −0 Go to diff View file
M plugins/document/scripts/document/index.js +3 −1 Go to diff View file
M plugins/document/scripts/package-lock.json +8 −0 Go to diff View file
M plugins/document/scripts/package.json +1 −1 Go to diff View file
M plugins/label/www/scripts/package-lock.json +8 −0 Go to diff View file
M plugins/label/www/scripts/package.json +1 −1 Go to diff View file
D plugins/label/www/scripts/project-labeled-items/src/LabeledItem.spec.js +0 −42 Go to diff View file
M plugins/label/www/scripts/project-labeled-items/src/LabeledItem.vue +3 −17 Go to diff View file
M plugins/label/www/scripts/project-labeled-items/src/app.spec.js +3 −2 Go to diff View file
M plugins/label/www/scripts/project-labeled-items/src/index.js +7 −1 Go to diff View file