mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 11:01:54 +03:00
fix: get rid of @html usages (#7072)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
e96f377dde
commit
ef496d55cd
@ -58,5 +58,8 @@
|
||||
"@typescript-eslint/no-floating-promises": "warn"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"rules": {
|
||||
"svelte/no-at-html-tags": "error"
|
||||
}
|
||||
}
|
||||
|
@ -13,11 +13,12 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import dompurify from 'dompurify'
|
||||
import DOMPurify from 'dompurify'
|
||||
|
||||
export let value: string
|
||||
|
||||
$: sanitized = dompurify.sanitize(value)
|
||||
$: sanitized = DOMPurify.sanitize(value)
|
||||
</script>
|
||||
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html sanitized}
|
||||
|
@ -30,5 +30,6 @@
|
||||
|
||||
{#if text}
|
||||
<!-- "replaceURLs" produces sanitazed string -->
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
{@html replaceURLs(text)}
|
||||
{/if}
|
||||
|
@ -16,6 +16,7 @@
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import Label from '../Label.svelte'
|
||||
import IconCheck from '../icons/Check.svelte'
|
||||
import Html from '../Html.svelte'
|
||||
|
||||
export let langs: any
|
||||
export let selected: string
|
||||
@ -34,7 +35,7 @@
|
||||
dispatch('close', lang.id)
|
||||
}}
|
||||
>
|
||||
<div class="svg-16px flex-no-shrink text-16px mr-2">{@html lang.logo}</div>
|
||||
<div class="svg-16px flex-no-shrink text-16px mr-2"><Html value={lang.logo} /></div>
|
||||
<span class="overflow-label flex-grow"><Label label={lang.label} /></span>
|
||||
<div class="ap-check">
|
||||
{#if lang.id === selected}
|
||||
|
@ -17,6 +17,7 @@
|
||||
import { getMetadata } from '@hcengineering/platform'
|
||||
import ui, { showPopup, deviceOptionsStore as deviceInfo } from '../..'
|
||||
import LangPopup from './LangPopup.svelte'
|
||||
import Html from '../Html.svelte'
|
||||
|
||||
let pressed: boolean = false
|
||||
|
||||
@ -70,5 +71,7 @@
|
||||
class:pressed
|
||||
on:click={selectLanguage}
|
||||
>
|
||||
{@html selected?.logo}
|
||||
{#if selected}
|
||||
<Html value={selected.logo} />
|
||||
{/if}
|
||||
</button>
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { getMetadata, translate } from '@hcengineering/platform'
|
||||
import { Button, IconClose, Label, themeStore } from '@hcengineering/ui'
|
||||
import { Button, Html, IconClose, Label, themeStore } from '@hcengineering/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import calendar from '../plugin'
|
||||
import { concatLink } from '@hcengineering/core'
|
||||
@ -72,7 +72,7 @@
|
||||
<Label label={calendar.string.RedirectGoogle} />
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
{@html label}
|
||||
<Html value={label} />
|
||||
</div>
|
||||
|
||||
<img class="image" src={getMetadata(calendar.image.Permissions)} alt="" />
|
||||
|
@ -148,7 +148,7 @@
|
||||
{/key}
|
||||
</div>
|
||||
{#if rejectingMessage !== undefined && approver.approved === 'rejected'}
|
||||
<div class="reject-message">{@html rejectingMessage}</div>
|
||||
<div class="reject-message">{rejectingMessage}</div>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Loading, themeStore } from '@hcengineering/ui'
|
||||
import { Html, Loading, themeStore } from '@hcengineering/ui'
|
||||
import { DiffFile, DiffLine, DiffLineType, DiffViewMode } from '@hcengineering/diffview'
|
||||
|
||||
import { DiffLineRenderResult, RenderOptions, renderHunk } from '../highlight'
|
||||
@ -110,7 +110,7 @@
|
||||
<td class="num-line {lineClass}">{line.oldNumber ?? ''}</td>
|
||||
<td class="num-line {lineClass}">{line.newNumber ?? ''}</td>
|
||||
<td class="code-line select-text {lineClass}" data-code-marker={line.prefix}>
|
||||
{@html line.content}
|
||||
<Html value={line.content} />
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
@ -130,11 +130,11 @@
|
||||
<tr>
|
||||
<td class="num-line {beforeLineClass}">{before.oldNumber ?? ''}</td>
|
||||
<td class="code-line select-text {beforeLineClass}" data-code-marker={before.prefix}>
|
||||
{@html before.content}
|
||||
<Html value={before.content} />
|
||||
</td>
|
||||
<td class="num-line {afterLineClass}">{after.newNumber ?? ''}</td>
|
||||
<td class="code-line select-text {afterLineClass}" data-code-marker={after.prefix}>
|
||||
{@html after.content}
|
||||
<Html value={after.content} />
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
|
@ -15,7 +15,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { getMetadata, translate } from '@hcengineering/platform'
|
||||
import { Button, IconClose, Label, themeStore } from '@hcengineering/ui'
|
||||
import { Button, Html, IconClose, Label, themeStore } from '@hcengineering/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import gmail from '../plugin'
|
||||
import { concatLink } from '@hcengineering/core'
|
||||
@ -70,7 +70,7 @@
|
||||
<div class="content">
|
||||
<Label label={gmail.string.RedirectGoogle} />
|
||||
<div class="mt-2">
|
||||
{@html label}
|
||||
<Html value={label} />
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import Play from '../icons/Play.svelte'
|
||||
import { getPlatformColor, themeStore } from '@hcengineering/ui'
|
||||
import { Html, getPlatformColor, themeStore } from '@hcengineering/ui'
|
||||
|
||||
export let href: string
|
||||
const maxWidth = 400
|
||||
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div bind:this={emb}>
|
||||
{@html data.html}
|
||||
<Html value={data.html} />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user