Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
/ rel-to-abs Public archive

Convert relative URLs to absolute URLs given an HTML source

License

Notifications You must be signed in to change notification settings

auth0/rel-to-abs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Given an HTML source, it will convert any URL on links, images, scripts, etc to abosulte URLs.

Install

npm install rel-to-abs

Usage

var converter = require('rel-to-abs');

var converted = converter.convert('<img src="foo.png">', 'http://mysite.com');

converted == <img src="http://mysite.com/foo.png">

Credits

http://stackoverflow.com/questions/7544550/javascript-regex-to-change-all-relative-urls-to-absolute

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.

About

Convert relative URLs to absolute URLs given an HTML source

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published