[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Bug in wml::std::href


in wml::std::href there is a small bug. I tried to create a link to my
Deja(news)-Posting profile using:


wml::std::href thought (because of the "@"), it is an Email-Adress and
prepended "mailto:" to the URL, which is - of course - wrong.

With the following patch I tried to fix that problem.

Bye, Wolfgang

--- href.src.old        Sat Jan  1 15:45:57 2000
+++ href.src.new        Sun Jan  2 21:18:57 2000
@@ -27,8 +27,10 @@
 <if <get-var target>
     <set-var target=" target=\"<get-var target>\"">
-<if <match "<get-var url>" ".+@.*[^.]+\\.[^.]+">
-    <set-var url="mailto:<get-var url>">
+<if <not <match "<get-var url>" "([hH][tT][tT][pP]|[fF][tT][pP])://.+"> >
+    <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>">

Diese Mail kommt von: Wolfgang Dautermann
WWW-Homepage: http://oeh.tu-graz.ac.at/~dauti/

Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com