File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,10 +19,10 @@ jobs:
1919 runs-on : ubuntu-latest
2020 steps :
2121 - name : 🛎️ Checkout code
22- uses : actions/checkout@v4
22+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323
2424 - name : 🥟 Setup Bun
25- uses : oven-sh/setup-bun@v2
25+ uses : oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.0.1
2626 with :
2727 bun-version : latest
2828
3333 run : bun run build
3434
3535 - name : 📁 Upload Pages artifact
36- uses : actions/upload-pages-artifact@v3
36+ uses : actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
3737 with :
3838 path : ./dist
3939
4848 steps :
4949 - name : 🚀 Deploy to GitHub Pages
5050 id : deployment
51- uses : actions/deploy-pages@v4
51+ uses : actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
Original file line number Diff line number Diff line change 1212 },
1313 "dependencies" : {
1414 "@element-plus/icons-vue" : " ^2.3.2" ,
15+ "dompurify" : " ^3.3.3" ,
1516 "element-plus" : " ^2.13.5" ,
1617 "oh-vue-icons" : " ^1.0.0-rc3" ,
1718 "vue" : " ^3.5.29" ,
1819 "vue-router" : " 4"
1920 },
2021 "devDependencies" : {
2122 "@tsconfig/node24" : " ^24.0.4" ,
23+ "@types/dompurify" : " ^3.2.0" ,
2224 "@types/node" : " ^24.11.0" ,
2325 "@vitejs/plugin-vue" : " ^6.0.4" ,
2426 "@vue/tsconfig" : " ^0.9.0" ,
3234 "vue-tsc" : " ^3.2.5"
3335 },
3436 "overrides" : {
37+ "lodash" : " ^4.18.1" ,
38+ "lodash-es" : " ^4.18.1" ,
3539 "unimport" : " latest" ,
3640 "strip-literal" : " latest"
3741 },
Original file line number Diff line number Diff line change 22import { ref , computed } from ' vue' ;
33import { DocumentCopy } from ' @element-plus/icons-vue' ;
44import { ElMessage } from ' element-plus' ;
5+ import DOMPurify from ' dompurify' ;
56import {
67 distros ,
78 methods ,
@@ -21,6 +22,8 @@ const selectedDe = ref<string>(deWms[0] || '');
2122const selectedEnv = ref <string >(environments [1 ] || ' ' );
2223const selectedInit = ref <string >(initSystems [0 ] || ' systemd' );
2324
25+ const sanitize = (html : string ) => DOMPurify .sanitize (html );
26+
2427const activateServerCode = computed (() => {
2528 if (selectedDistro .value === ' NixOS' )
2629 return ' # Bước này đã được cấu hình trong flake.nix ở trên.' ;
@@ -346,7 +349,7 @@ const chromiumWaylandFlags =
346349 <li
347350 v-for =" (step, idx) in fcitx5Config.steps"
348351 :key =" idx"
349- v-html =" step"
352+ v-html =" sanitize( step) "
350353 ></li >
351354 </ul >
352355 </div >
@@ -398,7 +401,7 @@ const chromiumWaylandFlags =
398401 <li
399402 v-for =" (point, idx) in waylandDeSpecific.best_setup"
400403 :key =" idx"
401- v-html =" point"
404+ v-html =" sanitize( point) "
402405 ></li >
403406 </ul >
404407 </div >
You can’t perform that action at this time.
0 commit comments