On 10 Apr 2010, at 03:33, Martin Fossdal Guttesen wrote:

> Sorry i dont know Flash or ActionScript
> 
> and after thinking about it. it would be better to handle it on the server
> and i dont know rails ruby or what it is called
> 
> but i have looked at the source and i think i have found the spot where the 
> change has to be made
> in way.rb line 189
> 
> def add_tag_keyval(k, v)
>    @tags = Hash.new unless @tags
> 
>    # duplicate tags are now forbidden, so we can't allow values
>    # in the hash to be overwritten.
>    raise OSM::APIDuplicateTagsError.new("way", self.id, k) if 
> @tags.include? k
> 
>    @tags[k] = v
>  end
> 
> as i said before i dont know ruby, but a little googling i found strip
> so i think that it should be
> 
> @tags[k.strip] = v.strip
> 
> there should also be a check if the trimmed v and k are empty and raise 
> errors accordingly

Actually you'll find that keys and values of zero length are explicitly allowed 
take a look at the *_tag model validations and the relevant unit tests.

Shaun


_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to