Title: Allow customizing SAFE_URL_PATTERN in url_sanitizer.ts · Issue #12840 · angular/angular · GitHub
Open Graph Title: Allow customizing SAFE_URL_PATTERN in url_sanitizer.ts · Issue #12840 · angular/angular
X Title: Allow customizing SAFE_URL_PATTERN in url_sanitizer.ts · Issue #12840 · angular/angular
Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/an...
Open Graph Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request...
X Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not su...
Opengraph URL: https://github.com/angular/angular/issues/12840
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow customizing SAFE_URL_PATTERN in url_sanitizer.ts","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING\r\n-->\r\n\r\n**I'm submitting a ...** (check one with \"x\")\r\n```\r\n[ ] bug report => search github for a similar issue or PR before submitting\r\n[x] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\nIt is not possible to customize which URLs are considered safe.\r\n\r\n**Expected behavior**\r\nA user could customize the REGEX used to match safe urls.\r\n\r\n**Minimal reproduction of the problem with instructions**\r\nN/A\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nWhen you are using ionic 2, Android will usually return URLs that begin with `content://`. Then you have to explicitly call `bypassSecurityTrustUrl` to be able to show them. In Angular 1 you could customize this by injecting `$compileProvider` and calling: `$compileProvider.imgSrcSanitizationWhitelist(/^\\s*(https?|ftp|file|blob|content):|data:image\\//);`. But there's no convenience alternative for angular 2.\r\n\r\n**Please tell us about your environment:**\r\nN/A\r\n\r\n* **Angular version:** 2.0.X\r\n2.2.0-rc.0\r\n\r\n* **Browser:** all\r\n \r\n* **Language:** all\r\n\r\n* **Node (for AoT issues):** `node --version` = 7.1.0\r\n","author":{"url":"https://github.com/gabzim","@type":"Person","name":"gabzim"},"datePublished":"2016-11-12T20:30:14Z","url":"https://github.com/angular/angular/issues/12840"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c598bac2-45fc-1904-9da4-fa4f1f4f3a1b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DDEA:D5AA4:FCF1A1:1521435:6B01065A |
| html-safe-nonce | b9b84f9d939d204240e4b995068de838146d4638ea0cddde412ef1b9c92d8c82 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEREVBOkQ1QUE0OkZDRjFBMToxNTIxNDM1OjZCMDEwNjVBIiwidmlzaXRvcl9pZCI6IjM4NjY0MjQyMzEzMjM1Njc3MDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0baaed68d57b2bd27e858ee05ffa15de53ba6059b1de0de28a4e02772f91cd8a |
| hovercard-subject-tag | issue:188932964 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/12840/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9276e8dfb60fb11f125f1316eb9f15cecc8c53957dae2e92a2d997cbf8bdf152/angular/angular/issues/12840 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9276e8dfb60fb11f125f1316eb9f15cecc8c53957dae2e92a2d997cbf8bdf152/angular/angular/issues/12840 |
| og:image:alt | I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gabzim |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width