From cdf12b7a33334fefe58ed140c2874217591ac69e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 5 Jun 2008 23:27:52 +0000 Subject: [PATCH 1/1] 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. --- app/views/site/index.rhtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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() { -- 2.39.5