Skip to content

Commit 1822c86

Browse files
susnuxbackportbot[bot]
authored andcommitted
fix(federatedfilesharing): pre must not be a child of p
Fix the problem reported: > [plugin vite:vue] apps/federatedfilesharing/src/components/PersonalSettings.vue: <pre> cannot be child of <p>, according to HTML specifications. > This can cause hydration errors or potentially disrupt future functionality. `p` only allows inline elements, but pre is none. We either need to use `div` instead of `p` or `code` instead of `pre`. But in this case we want a block of code, so we use `div` and inner `<pre><code>`. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> [skip ci]
1 parent ee4ddc6 commit 1822c86

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/federatedfilesharing/src/components/PersonalSettings.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
</a>
6969
</p>
7070

71-
<p>
72-
{{ t('federatedfilesharing', 'HTML Code:') }}
71+
<div>
72+
<p>{{ t('federatedfilesharing', 'HTML Code:') }}</p>
7373
<br>
74-
<pre>{{ htmlCode }}</pre>
75-
</p>
74+
<pre><code>{{ htmlCode }}</code></pre>
75+
</div>
7676
</template>
7777
</NcSettingsSection>
7878
</template>

0 commit comments

Comments
 (0)