feat(sanitizer): add support for allowlisting additional URI protocols
Signed-off-by: Nick Hudkins <nick@nickhudkins.com>
This commit is contained in:
Vendored
+10
@@ -58,6 +58,16 @@ export interface Config {
|
||||
* @visibility frontend
|
||||
*/
|
||||
allowedCustomElementAttributeNameRegExp?: string;
|
||||
/**
|
||||
* Allows listed protocols in attributes with URI values
|
||||
* Example:
|
||||
* additionalAllowedURIProtocols: ['vscode']
|
||||
* this will allow all attributes with URI values to have `vscode` protocol like `vscode://some/path` in addition to the default protocols
|
||||
* matched by DOMPurify's IS_ALLOWED_URI RegExp:
|
||||
* @see: https://raw.githubusercontent.com/cure53/DOMPurify/master/src/regexp.ts
|
||||
* @visibility frontend
|
||||
*/
|
||||
additionalAllowedURIProtocols?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user