It may be a little heavy, but a filter could do that.
This is a stripped down sample version of one we use
to chew up certain uris in pages.

<%filter>

$_ =~ s#<(frame\s+src|a\s+href|img\s+src)\s*=['"]{0,1}(.*?)['"]{0,1}\s+(.*?)>#
   eval{
       my $type = $1;
       my $to = $2;
       my $extra = $3;
       if ($to =~ /^http:\/\//) {
           if ($extra) {
               return "<$type='$to' $extra>";
           }
           return "<$type='$to'>";
       }
       else {
           return "<$type='http://www.example.com/$to' $extra>";
       }
    #esgi;

</%filter>

Ryan Perry wrote:

Is there any easy way for me to output all URLs with the domain prefix? ('/root/directory1/someimage.png' -> 'http://somedomain.com/ root/directory1/someimage.png'). Any ideas?

Thanks!




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to