Title: DBNull: Some Fields With False Are Now Seen As Equal To DBNull - Changed After Preview 1 · Issue #10980 · PowerShell/PowerShell · GitHub
Open Graph Title: DBNull: Some Fields With False Are Now Seen As Equal To DBNull - Changed After Preview 1 · Issue #10980 · PowerShell/PowerShell
X Title: DBNull: Some Fields With False Are Now Seen As Equal To DBNull - Changed After Preview 1 · Issue #10980 · PowerShell/PowerShell
Description: This behavior is something I just came across while utilizing mshtml.HTMLDocumentClass. Prior to Preview 2, fields that were seen as having values of False were not considered the same as [BDNull]::Value. Since Preview 2 through the curr...
Open Graph Description: This behavior is something I just came across while utilizing mshtml.HTMLDocumentClass. Prior to Preview 2, fields that were seen as having values of False were not considered the same as [BDNull]:...
X Description: This behavior is something I just came across while utilizing mshtml.HTMLDocumentClass. Prior to Preview 2, fields that were seen as having values of False were not considered the same as [BDNull]:...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10980
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DBNull: Some Fields With False Are Now Seen As Equal To DBNull - Changed After Preview 1","articleBody":"This behavior is something I just came across while utilizing mshtml.HTMLDocumentClass. \r\n\r\nPrior to Preview 2, fields that were seen as having values of False were not considered the same as [BDNull]::Value. \r\n\r\nSince Preview 2 through the current 5, these fields are now seen as equivalent to [DBNull]\r\n\r\nAttached a sample ChromeBookmark export file I used for these.\r\n\r\nPowerShell 5 Example With Results\r\n```powershell\r\n$BK = New-Object -Com \"HTMLFile\"\r\n$BK.IHTMLDocument2_write($(Get-Content .\\ChromeBKSample.txt -Raw))\r\n\r\n$BKL = $BK.links[0]\r\n\r\n($BKL.attributes(\"disabled\")).nodeValue\r\nFalse\r\n($BKL.attributes(\"disabled\")).nodeValue -eq [DBNull]::Value\r\nFalse\r\n```\r\n\r\n\r\nPowerShell 7 Preview 5 Example With Results (And alterations needed to make it work with PSH6+)\r\n```powershell\r\nAdd-Type -Path \"C:\\Program Files (x86)\\Microsoft.NET\\Primary Interop Assemblies\\Microsoft.mshtml.dll\"\r\n$BK = New-Object mshtml.HTMLDocumentClass\r\n$BK.IHTMLDocument2_write($(Get-Content .\\ChromeBKSample.txt -Raw))\r\n\r\n$BKL = $BK.links.item(0)\r\n\r\n($BKL.attributes.item(\"disabled\")).nodeValue\r\nFalse\r\n\r\n# This used to return \"False\", but since Preview 2 now returns True, despite also showing it as having a value of False:\r\n($BKL.attributes.item(\"disabled\")).nodeValue -eq [DBNull]::Value\r\nTrue\r\n\r\n```\r\n\r\n\r\n[ChromeBKSample.txt](https://github.com/PowerShell/PowerShell/files/3802178/ChromeBKSample.txt)\r\n\r\nPossibly related to changes from other issues?: #9561, #9794, #10404\r\n","author":{"url":"https://github.com/BouwenMA","@type":"Person","name":"BouwenMA"},"datePublished":"2019-11-03T22:23:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":18},"url":"https://github.com/10980/PowerShell/issues/10980"}
| 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:028a5651-ee84-75ac-378d-61b12b8e078c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1A4:2ED0A6:FEE444:157064F:6A5AA4BF |
| html-safe-nonce | 7f41c8d8e5c552a1648b40119b1ee91a880ea7a5a1840c79367b5c17f505173d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUE0OjJFRDBBNjpGRUU0NDQ6MTU3MDY0Rjo2QTVBQTRCRiIsInZpc2l0b3JfaWQiOiI4ODkwMjg4NzEzNDI0ODcyNjM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f0a5f2300855489bc319503b5bddfafb1b3c48f210dee8d05b3ec59e5e8265ff |
| hovercard-subject-tag | issue:516898701 |
| 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/PowerShell/PowerShell/10980/issue_layout |
| twitter:image | https://opengraph.githubassets.com/80e46bf731d62741cb167cb8905238b3ab8254dc6aaddd1de855218e05f71d43/PowerShell/PowerShell/issues/10980 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/80e46bf731d62741cb167cb8905238b3ab8254dc6aaddd1de855218e05f71d43/PowerShell/PowerShell/issues/10980 |
| og:image:alt | This behavior is something I just came across while utilizing mshtml.HTMLDocumentClass. Prior to Preview 2, fields that were seen as having values of False were not considered the same as [BDNull]:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BouwenMA |
| hostname | github.com |
| expected-hostname | github.com |
| None | 17a57ee6ab03686731c491fccb57e6a97c066a29d7cdf1a7d83c46f5c56684fc |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| 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 | 5cb870aa6b86b87be75e23ca7caec54726a25af9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width