Skip to content

XSS in href attribute, issue a warning #6423

@m1212e

Description

@m1212e

This (see code snippet below) currently works without any warning etc.
Imagine test being user input. Since many developers just use frameworks for the comfort to not having to think about XSS and other security relevant things, maybe it would be a good idea to at least issue a warning to the console when this occurs? React acutally made this deprecated and plans to make it stop working.

<script lang="ts">
	let test = `javascript:alert('1')`;
</script>

<main>
	<a href={test}>test</a>
</main>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions