Committer: gariev
LJSUP-6862: Add ability to insert maps (Google&Yandex) into the postsU trunk/cgi-bin/LJ/Maps.pm
Modified: trunk/cgi-bin/LJ/Maps.pm =================================================================== --- trunk/cgi-bin/LJ/Maps.pm 2010-10-11 07:36:10 UTC (rev 17531) +++ trunk/cgi-bin/LJ/Maps.pm 2010-10-11 07:41:45 UTC (rev 17532) @@ -19,8 +19,8 @@ my $iframe_url; my $width = LJ::ehtml($attr->{'width'}) || 500; my $height = LJ::ehtml($attr->{'height'}) || 350; - if ($host eq 'maps.google.com') { - $iframe_url = URI->new("http://maps.google.com/"); + if ($host =~ /^maps\.google\.\w+$/) { + $iframe_url = URI->new("http://$host/"); $url_params{'output'} = 'embed'; $iframe_url->query_form(%url_params); } elsif ($host eq 'maps.yandex.ru') {