save-text-to-file-firefox icon indicating copy to clipboard operation
save-text-to-file-firefox copied to clipboard

Convert relative paths to absolute paths when saving HTML text

Open PointyWizardHat opened this issue 9 years ago • 0 comments

Hi, When saving the selection as HTML text, I would like the relative paths to be automatically converted to absolute paths. This way if I parse the text into HTML later, all the images and links will work.

I'm not that familiar with HTML so in case I used incorrect terms, just to be clear I mean: if the selection includes a link like

<img src="./thumb/image.png"> OR <a href="./links/screen/index.html" >

the script would save those as

<img src="http://www.site.com/thumb/image.png"> OR <a href="http://www.site.com/links/screen/index.html">

Thanks!

PointyWizardHat avatar May 27 '15 16:05 PointyWizardHat