Title: Can't escape single quotes in single quote string · Issue #442 · phpdotenv/phpdotenv · GitHub
Open Graph Title: Can't escape single quotes in single quote string · Issue #442 · phpdotenv/phpdotenv
X Title: Can't escape single quotes in single quote string · Issue #442 · phpdotenv/phpdotenv
Description: If I have a value (using the bash way to "escape" a single quote in a single quote string): BLARG='hey'\''string' I get the following error: Fatal error: Uncaught Dotenv\Exception\InvalidFileException: Failed to parse dotenv file due to ...
Open Graph Description: If I have a value (using the bash way to "escape" a single quote in a single quote string): BLARG='hey'\''string' I get the following error: Fatal error: Uncaught Dotenv\Exception\InvalidFileExcept...
X Description: If I have a value (using the bash way to "escape" a single quote in a single quote string): BLARG='hey'\''string' I get the following error: Fatal error: Uncaught Dote...
Opengraph URL: https://github.com/phpdotenv/phpdotenv/issues/442
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't escape single quotes in single quote string","articleBody":"If I have a value (using the bash way to \"escape\" a single quote in a single quote string):\r\n\r\n`BLARG='hey'\\''string'`\r\n\r\nI get the following error:\r\n\r\n`Fatal error: Uncaught Dotenv\\Exception\\InvalidFileException: Failed to parse dotenv file due to unexpected whitespace. Failed at ['hey'\\''string']. in /var/www/html/vendor/vlucas/phpdotenv/src/Loader/Parser.php on line 119`\r\n\r\nEven if I try this, which doesn't work in bash, but would be more in line with double quotes I still get an error:\r\n\r\n`BLARG='hey\\'string'`\r\n\r\nOne or the other should be supported. Preferably the former as it's more inline with bash interpretation of env vars, so the same env file can be used by bash scripts and php.\r\n\r\nI'm using single quotes to avoid interpolation by double quotes.\r\n\r\nI'm using 4.1.6\r\n\r\n","author":{"url":"https://github.com/jordie23","@type":"Person","name":"jordie23"},"datePublished":"2020-05-25T05:35:30Z","url":"https://github.com/phpdotenv/phpdotenv/issues/442"}
| 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:7fd0bb30-1122-80db-7159-ce75ff53b505 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D7CC:C35D8:9EA6AD:CF57D9:6B063739 |
| html-safe-nonce | 9d89a255f3fc4a38909fbd1d46635c5253f906ff9d0a054c058d33078fc08f80 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0NDOkMzNUQ4OjlFQTZBRDpDRjU3RDk6NkIwNjM3MzkiLCJ2aXNpdG9yX2lkIjoiNzc2Nzg4NDY2MDg2NDMzMzYyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fffd041583c7efd663e4fc8541c164ccbac3506d70d158dbd6f9cd4f52571712 |
| hovercard-subject-tag | issue:624057243 |
| 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/phpdotenv/phpdotenv/442/issue_layout |
| twitter:image | https://opengraph.githubassets.com/87d3e7f29178db021e67042566710af2b4c3ffed9ad3a9abb1400fd6ca192f2a/phpdotenv/phpdotenv/issues/442 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/87d3e7f29178db021e67042566710af2b4c3ffed9ad3a9abb1400fd6ca192f2a/phpdotenv/phpdotenv/issues/442 |
| og:image:alt | If I have a value (using the bash way to "escape" a single quote in a single quote string): BLARG='hey'\''string' I get the following error: Fatal error: Uncaught Dotenv\Exception\InvalidFileExcept... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jordie23 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/phpdotenv/phpdotenv git https://github.com/phpdotenv/phpdotenv.git |
| octolytics-dimension-user_id | 320763234 |
| octolytics-dimension-user_login | phpdotenv |
| octolytics-dimension-repository_id | 7769432 |
| octolytics-dimension-repository_nwo | phpdotenv/phpdotenv |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7769432 |
| octolytics-dimension-repository_network_root_nwo | phpdotenv/phpdotenv |
| 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 | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width