From: Tom Hughes Date: Thu, 5 Jun 2008 23:27:52 +0000 (+0000) Subject: Don't use comma to separate values in the location cookie, as rails 2.0.2 will X-Git-Tag: live~7781 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cdf12b7a33334fefe58ed140c2874217591ac69e Don't use comma to separate values in the location cookie, as rails 2.0.2 will treat comma (as well as semicolon) as a cookie separate. Also change the name of the location cookie to avoid problems parsing old ones. --- diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index e30dad1d0..a79ea10c3 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -58,8 +58,8 @@ by the OpenStreetMap project and its contributors. <% lat = h(params['mlat']) %> <% zoom = h(params['zoom'] || '12') %> <% layers = h(params['layers']) %> -<% elsif cookies.key?("location") %> -<% lon,lat,zoom,layers = cookies["location"].split(",") %> +<% elsif cookies.key?("_osm_location") %> +<% lon,lat,zoom,layers = cookies["_osm_location"].split("|") %> <% elsif @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> <% lon = @user.home_lon %> <% lat = @user.home_lat %> @@ -148,7 +148,7 @@ by the OpenStreetMap project and its contributors. updatelinks(lonlat.lon, lonlat.lat, zoom, layers); - document.cookie = "location=" + lonlat.lon + "," + lonlat.lat + "," + zoom + "," + layers; + document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers; } function resizeContent() {