Ran into a problem where my database password contained a double quote. Changed the Ruby buildpack to allow URI encoding in the username, password, and database name portions of DATABASE_URL.
Don't rely on custom method for emitting YAML
Custom method misses edge cases, such as strings containing quotes.
Allow URI-escaped username, password, and database
This allows the encoding of previously unusable characters (such as
double quote and backslash) in the username, password, or database
portions of DATABASE_URL.
This PR has been open for a year with no comment (sorry). I'm not sure how I feel about url compliant characters in those locations. Who generated the urls? While I can see the use for this i've not run into anyone else who needed this functionality, and the workaround would be to change your username/password on the destination url. It also looks like you can set quotes correctly in config vars:
$ heroku config:add 'FOO=blar"nar' -a frozen-thicketz-1482
Setting config vars and restarting frozen-thicketz-1482... done, v8
Closing for now