A relative URL
relative/r.txt
An absolute URL
mytext.docx
A fully qualified URL
Documentation
}]
set result [ad_html_qualify_links -location {http://myhost/} $html]
aa_true "result contains relative URL NOT expanded" {[string match *href=\"$rURL* $result]}
aa_true "result contains absolute URL location-prefixed" {[string match *http://myhost$aURL* $result]}
aa_true "result contains fully qualified URL" {[string match *$fqURL* $result]}
aa_section "Testing with path"
set pretty_link "/dotlrn/clubs/club2/uploads/mytext.docx"
set result [ad_html_qualify_links -location {http://myhost/} -path /somepath $html]
aa_true "result contains relative URL expanded" {[string match */somepath/$rURL* $result]}
aa_true "result contains absolute URL location-prefixed" {[string match *http://myhost$aURL* $result]}
aa_true "result contains fully qualified URL" {[string match *$fqURL* $result]}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End: