From fc5c34d1b804e062c3305458e1167aa8dc3591ca Mon Sep 17 00:00:00 2001 From: Santosh Yadav Date: Thu, 25 Jun 2020 07:01:32 +0530 Subject: [PATCH] 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 https://github.com/google/closure-library/blob/bb7ea653194b590711614fd79b0a88a38a600740/closure/goog/html/safeurl.js#L440-L454 for more details Fixes #31462 PR Close #31463 --- packages/core/src/sanitization/url_sanitizer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/sanitization/url_sanitizer.ts b/packages/core/src/sanitization/url_sanitizer.ts index 9111a5df1b..c3f91fc51e 100644 --- a/packages/core/src/sanitization/url_sanitizer.ts +++ b/packages/core/src/sanitization/url_sanitizer.ts @@ -34,7 +34,7 @@ import {isDevMode} from '../util/is_dev_mode'; * * 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 */ const SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;