[Dive4elements-commits] [PATCH] Strip non-word characters from measurement station URL
Wald Commits
scm-commit at wald.intevation.org
Mon May 13 17:17:41 CEST 2013
# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1368453216 -7200
# Node ID a45da06797c7c1354c519c064d713477d38ef2ab
# Parent 324d349ae8d6ca6464264c042084fb49412c7e84
Strip non-word characters from measurement station URL
diff -r 324d349ae8d6 -r a45da06797c7 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationRecord.java
--- 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());
More information about the Dive4elements-commits
mailing list