[bknr-cvs] ksprotte changed trunk/projects/bos/web/kml-handlers.lisp

BKNR Commits bknr at bknr.net
Fri Sep 5 09:07:28 UTC 2008


Revision: 3801
Author: ksprotte
URL: http://bknr.net/trac/changeset/3801

fixed regexp in REPLACE-ALL-URL-HOSTS to also match a port if it is present

U   trunk/projects/bos/web/kml-handlers.lisp

Modified: trunk/projects/bos/web/kml-handlers.lisp
===================================================================
--- trunk/projects/bos/web/kml-handlers.lisp	2008-09-05 08:54:41 UTC (rev 3800)
+++ trunk/projects/bos/web/kml-handlers.lisp	2008-09-05 09:07:28 UTC (rev 3801)
@@ -89,7 +89,7 @@
 
 (defun replace-all-url-hosts (string new-host)
   "Replaces all hostnames in STRING by NEW-HOST."
-  (ppcre:regex-replace-all #?r"((?:https?|ftp)://)\w+(?:\.\w+)*" string #?r"\1${new-host}"))
+  (ppcre:regex-replace-all #?r"((?:https?|ftp)://)\w+(?:\.\w+)*(?::\d+)?" string #?r"\1${new-host}"))
 
 (defun replace-lang-query-params (string new-lang)
   (ppcre:regex-replace-all #?r"(?i)(lang=)[a-z]{2,2}" string #?r"\1${new-lang}"))




More information about the Bknr-cvs mailing list