discourse/lib/onebox
Loïc Guitaut 8b67a534a0 FIX: Allow floats for zoom level in Google Maps onebox
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.
2023-03-01 12:45:33 +01:00
..
engine FIX: Allow floats for zoom level in Google Maps onebox 2023-03-01 12:45:33 +01:00
mixins DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
templates DEV: Make it obvious that `joined` translation is used by onebox (#20158) 2023-02-03 10:02:14 +08:00
domain_checker.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
engine.rb FEATURE: Add better TikTok onebox support (#19934) 2023-01-23 09:49:02 -03:00
file_type_finder.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
helpers.rb DEV: Enable `unless` cops 2023-02-21 10:30:48 +01:00
json_ld.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
layout.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
layout_support.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
matcher.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
movie.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
normalizer.rb FEATURE: Show more context in Discourse topic oneboxes 2023-01-11 14:22:53 +01:00
oembed.rb Add support for JSON LD in Onebox (#17007) 2022-06-13 17:32:34 +02:00
open_graph.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
preview.rb DEV: Apply syntax_tree formatting to `lib/*` 2023-01-09 12:10:19 +00:00
sanitize_config.rb DEV: Prefer \A and \z over ^ and $ in regexes (#19936) 2023-01-20 12:52:49 -06:00
status_check.rb SECURITY: Expand and improve SSRF Protections (#18815) 2022-11-01 16:33:17 +00:00
template_support.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
view.rb DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30