firecat53 / urlscan

Mutt and terminal url selector (similar to urlview)
GNU General Public License v2.0
211 stars 36 forks source link

Regex doesn't work in neomutt? #134

Open sprnza opened 1 year ago

sprnza commented 1 year ago

Hi! Thanks for the project! I'm unable to setup urlscan to exclude mailto links:

macro index,pager \cu "<pipe-message> urlscan -scdE 'http.*'<enter>" "call urlscan to extract URLs out of a message"
macro attach,compose \cu "<pipe-entry> urlscan -scdE 'http.*'<enter>" "call urlscan to extract URLs out of a message"

When run from neomutt it still shows mailto links. If I run from command line I get it working properly:

sdg-dell ➜ ~ cat /tmp/urls
https://google.com
mailto:example.com
https://google.com
sdg-dell ➜ ~ urlscan -cdnE 'http.*' /tmp/urls
https://google.com

What could be wrong with my setup?

tjex commented 11 months ago

also not working for me. if I test the same sytax in a terminal, the mailto: link is not considered. But from neomutt, it is.

firecat53 commented 11 months ago

The issue appears to be that the regex is only applied to the plain text part of the message, not the HTML part. This will take some digging to solve...