in reply to RFC: Name and/or API for module ("HTML::RewriteURLs")

Rebase.pm sounds good for me, not sure about the path ...

... but HTML::Rebase should be obvious, since there is already a 'HTML <base> Tag' for the purpose of relative URLs.

(your code handles the base tag, right? ;)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re: RFC: Name and/or API for module ("HTML::RewriteURLs")

Replies are listed 'Best First'.
Re^2: RFC: Name and/or API for module ("HTML::RewriteURLs")
by Corion (Patriarch) on Jul 26, 2015 at 06:51 UTC

    My code doesn't handle tags, it blindly handles attributes. But as the <base> tag has the href= attribute, that will be rewritten too. Maybe the more proper approach would be to eliminate the tag but I'll wait for bug reports to come in :)

      Well. .. If you don't have options to handle base, then better forget my suggestion to call it Rebase.pm ... ;)

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

      Updated

      wording

        I've released it as HTML::Rebase without <base href= support. But while thinking about how to also process the tag, I think support for it should be fairly simple. First scan the HTML for the <base> tag. If it is there, use that URL instead of the user-supplied URL to rewrite all links.

        This will likely get into a later version.