urlscan icon indicating copy to clipboard operation
urlscan copied to clipboard

Regex doesn't work in neomutt?

Open sprnza opened this issue 2 years ago • 3 comments

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?

sprnza avatar Jul 28 '23 14:07 sprnza

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.

tjex avatar Aug 16 '23 17:08 tjex

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...

firecat53 avatar Aug 18 '23 02:08 firecat53