changeset 6008:a45da06797c7

Strip non-word characters from measurement station URL
author Tom Gottfried <tom.gottfried@intevation.de>
date Mon, 13 May 2013 15:53:36 +0200
parents 324d349ae8d6
children 6ea171b6d8d2
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationRecord.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationRecord.java	Mon May 13 13:21:05 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationRecord.java	Mon May 13 15:53:36 2013 +0200
@@ -31,9 +31,10 @@
 
         Integer number = station.getID();
         String stationName = station.getName();
+        String stationIdent = stationName.replaceAll("\W", "");
         String stationType = station.getMeasurementType();
         String link = MSG.measurement_station_url() + 
-            stationName + stationType;
+            stationIdent + stationType;
         this.setLink(link);
         this.setLinkText(MSG.measurement_station_info_link());
         this.setCurveLink(MSG.static_sqrelation());

http://dive4elements.wald.intevation.org