mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 22:21:55 +08:00
8b67a534a0
Sometimes we get Maps URL containing a zoom level as a float (17.5z and not 17z) but this doesn’t work with our current onebox implementation. While Google accepts those float zoom levels, it removes automatically the floating part in the URL (thus when visiting a Maps URL containing 17.5z, the URL will be rewritten shortly after as 17z). When putting a float zoom level in an embedded URL, this actually breaks (Maps API returns a 400 error). This patch addresses the issue by allowing the onebox engine to match on a zoom level expressed as a float but we only keep the integer part thus rendering properly maps. |
||
---|---|---|
.. | ||
engine | ||
mixins | ||
templates | ||
domain_checker.rb | ||
engine.rb | ||
file_type_finder.rb | ||
helpers.rb | ||
json_ld.rb | ||
layout_support.rb | ||
layout.rb | ||
matcher.rb | ||
movie.rb | ||
normalizer.rb | ||
oembed.rb | ||
open_graph.rb | ||
preview.rb | ||
sanitize_config.rb | ||
status_check.rb | ||
template_support.rb | ||
view.rb |