]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user/api_details.builder
Escape ampersands in URLs when exporting HTML for embedding
[rails.git] / app / views / user / api_details.builder
index 656218a92bb8b2d5ede864aa50c118b495e157cb..a164c7a56338e85884864abbcf2521f47c225500 100644 (file)
@@ -6,15 +6,16 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
     if @user.description
       xml.tag! "description", @user.description
     end
     if @user.description
       xml.tag! "description", @user.description
     end
+    xml.tag! "contributor-terms",
+        :agreed => !!@user.terms_agreed,
+        :pd => !!@user.consider_pd
     if @user.home_lat and @user.home_lon
       xml.tag! "home", :lat => @user.home_lat,
                        :lon => @user.home_lon,
                        :zoom => @user.home_zoom
     end    
     if @user.image
     if @user.home_lat and @user.home_lon
       xml.tag! "home", :lat => @user.home_lat,
                        :lon => @user.home_lon,
                        :zoom => @user.home_zoom
     end    
     if @user.image
-      # i'd love to use "url_for_file_column, :absolute=>true", but that doesn't seem
-      # to work with the file_column plugin version we're using.
-      xml.tag! "img", :href => ("http://" + SERVER_URL + url_for_file_column(@user, "image"))
+      xml.tag! "img", :href => (url_for_file_column(@user, "image", :absolute => true))
     end
     if @user.languages
       xml.tag! "languages" do
     end
     if @user.languages
       xml.tag! "languages" do