Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r17532: LJSUP-6862: Add ability to insert maps (...

Committer: gariev
LJSUP-6862: Add ability to insert maps (Google&Yandex) into the posts
U   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') {

Tags: gariev, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments