changeset 187:f080901d8163

corrected links in desc (RestDbGisApi)
author fknauft
date Wed, 16 Feb 2011 13:56:06 +0100
parents c0ced397fd26
children f87dda6f05d6
files RestDbGisApi.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/RestDbGisApi.py	Wed Feb 16 12:17:13 2011 +0100
+++ b/RestDbGisApi.py	Wed Feb 16 13:56:06 2011 +0100
@@ -295,8 +295,10 @@
                     #    continue
             
                     val = "%s: %s"%(name, value)
-                    if val.find('http')>-1:
-                        val ='<a href="' + value + ' " target="_blank"> ' + val + ' </a>'
+                    value=unicode(value)
+                    if value.find('http://')>-1:
+                        link_str=value[value.find('http://'):value.find(' ',value.find('http://'))]
+                        val =name+": "+value[0:value.find('http://')]+'<a href="' + link_str + ' " target="_blank">" ' + link_str + ' "</a>' + value[value.find(' ',value.find('http://')):]
                         
                     #desc += kmlEncode(val)
                     desc += val