Closed fireglow closed 2 years ago
Well, darn it. Guess I'll have to look at this again. Why can't everything respond the same way!! Thanks for the post.
Can you try using the xdg-open mode (cycle l
in the TUI) and see if that opens the urls correctly? I'm struggling here. I've got email urls that refuse to open correctly without that commit.
Are you opening urlscan with any particular options? Are you using it from Mutt? Which terminal? Is it possible to sanitize and send me a copy of an email that isn't working correctly with this commit (email me a .tar file is best to preserve the encoding and formatting)? I'm trying to figure out what's different about either your system or your emails from mine.
Thanks!
I'm running urlscan from mutt, via
macro pager \CV <pipe-entry>'urlscan'<enter> 'Follow links with urlscan'
in the kitty terminal emulator.
As a test, I'm using just a simple ampersand.php
:
<?php
echo $_GET['a'];
echo "\xA";
echo $_GET['b'];
And call it as https://example.com/ampersand.php?a=one&b=two which should just display "one two" in the browser.
When mailing https://example.com/ampersand.php?a=one&b=two to myself as a plaintext e-mail, and open it with
one\ two
one two
The mail is just a plain text email (Content-Type: text/plain; charset=us-ascii; format=flowed).
$ file Ampersand.eml
Ampersand.eml: SMTP mail, ASCII text, with CRLF line terminators
Aha! Finally figured it out. I was using a small wrapper script browser.sh to launch my web browser. Apparently that was affecting the backslash characters being sent to the browser. I'll revert that commit now, and we all should be good!
Commit 136c4ce5bdabe0c86aa51308f14b88704bea398f introduced escaping
&
, but it breaks URLs for me: As an example, the URL in the message ishttps://lesdisquesentreprise.us10.list-manage.com/about?u=0000000000000000000000000&id=0000000000&e=0000000000&c=0000000000
, but Firefox opens the URLhttps://lesdisquesentreprise.us10.list-manage.com/about?u=0000000000000000000000000\&id=0000000000\&e=0000000000\&c=0000000000
which the server cannot find. When undoing the replacement in urlchoose.py#L666, the URLs appearing in Firefox are verbatim the ones from the mail. Can anybody else confirm this?