Fix: Resolve parsing error and svelte/no-at-html-tags linting issues
Resolved a critical parsing error in leads_view_lead.svelte due to incorrect Svelte class directive syntax.
Addressed multiple svelte/no-at-html-tags linting errors across the following files to mitigate potential XSS vulnerabilities and improve code safety:
- src/routes/events_leads/exhibit/[slug]/leads_add_scan.svelte
- src/routes/events_leads/exhibit/[slug]/leads_manage.svelte
- src/routes/events_leads/exhibit/[slug]/leads_view_lead.svelte
Replaced {@html} blocks with safer Svelte conditional rendering ({#if}) and direct interpolation ({value}) for static and dynamic content where appropriate. Removed commented-out {@html} tags that were still triggering linting errors.
This commit is contained in:
@@ -293,9 +293,11 @@
|
||||
$events_loc.leads.default_to_scan = !$events_loc.leads.default_to_scan;
|
||||
}}
|
||||
>
|
||||
{@html $events_loc.leads.default_to_scan
|
||||
? '<span class="fas fa-toggle-on m-1"></span> Disable Default Scan?'
|
||||
: '<span class="fas fa-toggle-off m-1"></span> Enable Default Scan?'}
|
||||
{#if $events_loc.leads.default_to_scan}
|
||||
<span class="fas fa-toggle-on m-1"></span> Disable Default Scan?
|
||||
{:else}
|
||||
<span class="fas fa-toggle-off m-1"></span> Enable Default Scan?
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
<button
|
||||
@@ -309,9 +311,11 @@
|
||||
$events_loc.leads.auto_view = !$events_loc.leads.auto_view;
|
||||
}}
|
||||
>
|
||||
{@html $events_loc.leads.auto_view
|
||||
? '<span class="fas fa-toggle-on m-1"></span> Disable Auto View?'
|
||||
: '<span class="fas fa-toggle-off m-1"></span> Enable Auto View?'}
|
||||
{#if $events_loc.leads.auto_view}
|
||||
<span class="fas fa-toggle-on m-1"></span> Disable Auto View?
|
||||
{:else}
|
||||
<span class="fas fa-toggle-off m-1"></span> Enable Auto View?
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
{#if $events_loc.leads.show_content__scan_requirements}
|
||||
@@ -827,7 +831,7 @@
|
||||
{/if}
|
||||
|
||||
<div class="qr_quick_results preset-tonal-secondary font-bold p-4">
|
||||
{@html $events_sess.leads.qr_scan_result ?? 'No results yet'}
|
||||
{$events_sess.leads.qr_scan_result ?? 'No results yet'}
|
||||
</div>
|
||||
|
||||
<!-- This block needs to be moved or something. It takes up too much space! -->
|
||||
|
||||
Reference in New Issue
Block a user