mailparser icon indicating copy to clipboard operation
mailparser copied to clipboard

img src which are missing a protocol scheme

Open mgrant0 opened this issue 4 years ago • 1 comments

I'm using mailparser to grab the html from an email and then create an image using puppeteer. With URLs that are missing the 'http://' or 'https://' protocol scheme, the image doesn't load.

For example:

<img src="192.168.69.91/foo.jpg" border=0 /> 

I could regex through the resulting html after mailparser returned the html but this is messy. Could this be done inside mailparser as it tries to expand the html? Maybe some option to provide a default scheme for URLs missing a scheme? Or some way to provide a callback function which I could write a function to modify the URL?

Other suggestions to fix this greatly appreciated!

mgrant0 avatar Jan 30 '22 16:01 mgrant0

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 02 '25 02:12 github-actions[bot]

This issue was closed because it has been stalled for 15 days with no activity.

github-actions[bot] avatar Dec 17 '25 02:12 github-actions[bot]