/usr/share/wml/include/std/href.wml is in wml 2.0.12ds1-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | ##
## wml::std::href - Enhanced Hyperlink
## Copyright (c) 1997-2001 Ralf S. Engelschall, All Rights Reserved.
## Copyright (c) 1999-2001 Denis Barbier
##
# The <preserve>/<restore> tags with multiple arguments require WML 2.0.3
#use wml::mod::version
<require 2.0.3 />
<define-tag href whitespace=delete>
<preserve url name image hint target alternative />
<set-var %attributes />
<if <get-var name />
<copy-var name alternative />
<group <set-var name="<tt><get-var url /></tt>" />\
<if <get-var hint />
<copy-var hint alternative />
<copy-var url alternative />
/>\
/>
/>
<if <get-var hint />
<set-var hint=" onmouseover=\"self.status='<get-var hint />';return true\" \
onmouseout=\"self.status='';return true\" \
onfocus=\"self.status='<get-var hint />';return true\" \
onblur=\"self.status='';return true\"" \
/>
/>
<if <get-var target />
<set-var target=" target=\"<get-var target />\"" />
/>
<when <not <match "<downcase <get-var url /> />"
"^(http|ftp|telnet|gopher|news|mailto):" /> />>
<if <match "<get-var url />" ".+@.*[^.]+\\.[^.]+" />
<set-var url="mailto:<get-var url />" />
/>
<if <match "<get-var url />" "^www\\.[^.]+\\..+" />
<set-var url="http://<get-var url />" />
/>
<if <match "<get-var url />" "^ftp\\.[^.]+\\..+" />
<set-var url="ftp://<get-var url />" />
/>
</when>
<if <get-var image /> <group
"<a href="<get-var url />"<get-var hint /><get-var target />\
<attributes-quote <attributes-extract :a:(.*) %attributes /> />>\
<img src="<get-var image />" alt="<get-var alternative />" border=0\
<attributes-quote <attributes-extract :img:(.*) %attributes /> /> />\
</a>" /> <group
"<a href="<get-var url />"<get-var hint /><get-var target />\
<attributes-quote <attributes-extract :a:(.*) %attributes /> />>\
<get-var name /></a>"
/>
/>
<restore url name image hint target alternative />
</define-tag>
##EOF##
|