feat(platform-browser): Allow `sms`-URLs (#31463)
sms ulr is already supported by google/closure-library and and validations are added to check
if the body passed is safe or not you can refer bb7ea65319/closure/goog/html/safeurl.js (L440-L454)
for more details
Fixes #31462
PR Close #31463
This commit is contained in:
parent
0879d2e85d
commit
fc5c34d1b8
|
@ -34,7 +34,7 @@ import {isDevMode} from '../util/is_dev_mode';
|
||||||
*
|
*
|
||||||
* This regular expression was taken from the Closure sanitization library.
|
* This regular expression was taken from the Closure sanitization library.
|
||||||
*/
|
*/
|
||||||
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
|
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;
|
||||||
|
|
||||||
/* A pattern that matches safe srcset values */
|
/* A pattern that matches safe srcset values */
|
||||||
const SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;
|
const SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;
|
||||||
|
|
Loading…
Reference in New Issue