Parcourir la source

fixed:解决潜在的sql注入问题

nahida il y a 1 an
Parent
commit
b1868c0139
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      src/views/CEEnterprise/companydetail/index.vue

+ 5 - 0
src/views/CEEnterprise/companydetail/index.vue

@@ -54,6 +54,11 @@ const activeNames = ref([])
     //   console.log(r);
     // }
   const specialHanle = (rowProp,index,label)=>{
+      if(typeof rowProp == 'string'){
+        if(rowProp.includes('script') || rowProp.includes("img")){
+          return "违禁词"
+        }
+      }
     if(index == 0 || index == 1){
       return '<span style="font-size: 14px;font-weight: bold">'+rowProp+'</span>'
     }