Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-27 19:20:22 +05:00
parent 7868e94865
commit 5f3c2c337a
5 changed files with 32 additions and 15 deletions

View file

@ -0,0 +1,12 @@
package com.tangem.utils.extensions
private const val DEEPLINK_VALIDATION_REGEX = "['\";<>()+\\\\]"
/**
* Check for malicious symbol in uri part
*/
fun String.validate(): Boolean {
val regex = DEEPLINK_VALIDATION_REGEX.toRegex()
return !regex.containsMatchIn(this)
}