瀏覽代碼

restore v-html directive for jobs descriptions and news contents

Olivier Massot 1 年之前
父節點
當前提交
3b65e9b8cb
共有 3 個文件被更改,包括 11 次插入11 次删除
  1. 4 4
      components/JoinUs/MissionDetail.vue
  2. 4 4
      components/News/Details.vue
  3. 3 3
      pages/actualites/[id].vue

+ 4 - 4
components/JoinUs/MissionDetail.vue

@@ -72,10 +72,10 @@
           </v-row>
 
           <v-row>
-            <p class="custom-row description mb-12">
-              <!-- TODO: à revoir, en sachant qu'injecter du html ici serait une faille de sécurité sévère :( -->
-              {{ job.content }}
-            </p>
+            <p
+              v-html="job.content"
+              class="custom-row description mb-12"
+            />
           </v-row>
 
           <v-row class="d-flex justify-center align-center">

+ 4 - 4
components/News/Details.vue

@@ -47,10 +47,10 @@
           </v-row>
 
           <v-row class="custom-row">
-            <p class="description">
-              <!-- TODO: idem que pour les annonces -->
-              {{ newsItem.bodyText }}
-            </p>
+            <p
+              v-html="newsItem.bodyText"
+              class="description"
+            />
           </v-row>
 
           <v-row class="d-flex justify-center align-center">

+ 3 - 3
pages/actualites/[id].vue

@@ -1,9 +1,9 @@
 <template>
   <LayoutNavigation />
+
   <NewsDetails />
+
   <LayoutFooterPrefooter />
+
   <LayoutFooter />
 </template>
-<script setup lang="ts">
-import News from "~/components/Home/News.vue";
-</script>