GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — perf(core): use `ngDevMode` to tree-shake warnings (#39959) · angular/angular@1e3534f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • goldens/size-tracking
    • integration-payloads.json
  • packages/core/src/sanitization
    • html_sanitizer.ts
    • url_sanitizer.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎goldens/size-tracking/integration-payloads.json‎

Copy file name to clipboardExpand all lines: goldens/size-tracking/integration-payloads.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"master": {
4040
"uncompressed": {
4141
"runtime-es2015": 2285,
42-
"main-es2015": 242075,
42+
"main-es2015": 241457,
4343
"polyfills-es2015": 36709,
4444
"5-es2015": 745
4545
}
Collapse file

‎packages/core/src/sanitization/html_sanitizer.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/sanitization/html_sanitizer.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {isDevMode} from '../util/is_dev_mode';
109
import {getInertBodyHelper, InertBodyHelper} from './inert_body';
1110
import {_sanitizeUrl, sanitizeSrcset} from './url_sanitizer';
1211

@@ -269,7 +268,7 @@ export function _sanitizeHtml(defaultDoc: any, unsafeHtmlInput: string): string
269268
const sanitizer = new SanitizingHtmlSerializer();
270269
const safeHtml = sanitizer.sanitizeChildren(
271270
getTemplateContent(inertBodyElement!) as Element || inertBodyElement);
272-
if (isDevMode() && sanitizer.sanitizedSomething) {
271+
if ((typeof ngDevMode === 'undefined' || ngDevMode) && sanitizer.sanitizedSomething) {
273272
console.warn(
274273
'WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss');
275274
}
Collapse file

‎packages/core/src/sanitization/url_sanitizer.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/sanitization/url_sanitizer.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {isDevMode} from '../util/is_dev_mode';
109

1110
/**
1211
* A pattern that recognizes a commonly useful subset of URLs that are safe.
@@ -47,7 +46,7 @@ export function _sanitizeUrl(url: string): string {
4746
url = String(url);
4847
if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN)) return url;
4948

50-
if (isDevMode()) {
49+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
5150
console.warn(`WARNING: sanitizing unsafe URL value ${url} (see https://g.co/ng/security#xss)`);
5251
}
5352

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.