Skip to content

Commit 179674f

Browse files
#39 HTML characters are displayed instead of the entities
1 parent dce91c9 commit 179674f

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/views/CVERecord.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<th>Description</th>
6565
<td>
6666
<p v-for="description in this.$store.state.recordData.description_data" :key="description.index">
67-
{{$sanitize(description.value)}}
67+
<span v-html="$sanitize(description.value)"></span>
6868
</p>
6969
</td>
7070
</tr>
@@ -81,7 +81,7 @@
8181
<th>Problem Types</th>
8282
<td>
8383
<ul v-for="problem in this.$store.state.recordData.problemtype_data" :key="problem.index">
84-
<li v-if="problem.value !== 'n/a'">{{$sanitize(problem.value)}}</li>
84+
<li v-if="problem.value !== 'n/a'"><span v-html="$sanitize(problem.value)"></span></li>
8585
</ul>
8686
</td>
8787
</tr>
@@ -91,18 +91,20 @@
9191
<th>Vendors, Products & Versions</th>
9292
<td>
9393
<ul v-for="vendorProductVersion in this.$store.state.recordData.affects.vendors" :key="vendorProductVersion.index">
94-
<li><span class="has-text-weight-bold">Vendor:</span> {{$sanitize(vendorProductVersion.vendor_name)}} </li>
94+
<li>
95+
<span class="has-text-weight-bold">Vendor: </span><span v-html="$sanitize(vendorProductVersion.vendor_name)"></span>
96+
</li>
9597
<ul v-for="ProductVersion in vendorProductVersion.products" :key="ProductVersion.index" class="mb-2">
9698
<li v-if="ProductVersion !== undefined">
97-
<span class="has-text-weight-bold">Product:</span> {{$sanitize(ProductVersion.product_name)}}
99+
<span class="has-text-weight-bold">Product: </span><span v-html="$sanitize(ProductVersion.product_name)"></span>
98100
</li>
99101
<li v-if="ProductVersion.vendor_version.version_value && ProductVersion.vendor_version.version_value.length > 0">
100102
<span class="has-text-weight-bold">Versions:</span>
101-
{{$sanitize(ProductVersion.vendor_version.version_value.join(', '))}}
103+
<span v-html="$sanitize(ProductVersion.vendor_version.version_value.join(', '))"></span>
102104
</li>
103105
<li v-if="ProductVersion.vendor_version.version_affected && ProductVersion.vendor_version.version_affected.length > 0">
104106
<span class="has-text-weight-bold">Versions Affected: </span>
105-
{{$sanitize(ProductVersion.vendor_version.version_affected.join(', '))}}
107+
<span v-html="$sanitize(ProductVersion.vendor_version.version_affected.join(', '))"></span>
106108
</li>
107109
</ul>
108110
</ul>
@@ -113,7 +115,7 @@
113115
<td>
114116
<ul v-for="reference in this.$store.state.recordData.reference_data" :key="reference.index">
115117
<li v-if="reference.url !== undefined" class="cve-task-tile-list-item">
116-
<a :href="reference.url" class="cve-word-wrap">
118+
<a :href="$sanitize(reference.url)" class="cve-word-wrap">
117119
{{reference.name === undefined ? $sanitize(reference.url) : $sanitize(reference.name)}}
118120
</a>
119121
</li>

0 commit comments

Comments
 (0)