mirror of
https://github.com/docusealco/docuseal
synced 2026-11-16 08:12:32 -05:00
drop turbo attrs
This commit is contained in:
1 parent
82a6910181
commit
1cd3212736
1 file changed
+1
-1
@@ -178,7 +178,7 @@ const SAFE_URL_REGEXP = /^(?:https?:\/\/|data:image\/|blob:|mailto:|tel:|\{|#)/i
|
||||
function isSafeAttr (name, value) {
|
||||
const lowerName = name.toLowerCase()
|
||||
|
||||
if (lowerName.startsWith('on') || DROP_ATTRS.includes(lowerName)) return false
|
||||
if (lowerName.startsWith('on') || lowerName.startsWith('data-turbo') || DROP_ATTRS.includes(lowerName)) return false
|
||||
if ((lowerName === 'href' || lowerName === 'src') && !SAFE_URL_REGEXP.test(value.trim())) return false
|
||||
|
||||
return true
|
||||
|
||||
Reference in new issue
Block a user