diff --git a/core/lib/Drupal/Core/Url.php b/core/lib/Drupal/Core/Url.php
index b8fcdeb..46eeef8 100644
--- a/core/lib/Drupal/Core/Url.php
+++ b/core/lib/Drupal/Core/Url.php
@@ -341,7 +341,9 @@ public function setAbsolute($absolute = TRUE) {
    */
   public function toString() {
     if ($this->isExternal()) {
-      return $this->urlGenerator()->generateFromPath($this->getPath(), $this->getOptions());
+      $options = $this->getOptions();
+      $options['external'] = TRUE;
+      return $this->urlGenerator()->generateFromPath($this->getPath(), $options);
     }
 
     return $this->urlGenerator()->generateFromRoute($this->getRouteName(), $this->getRouteParameters(), $this->getOptions());
diff --git a/core/lib/Drupal/Core/Utility/LinkGenerator.php b/core/lib/Drupal/Core/Utility/LinkGenerator.php
index c29b332..b547d95 100644
--- a/core/lib/Drupal/Core/Utility/LinkGenerator.php
+++ b/core/lib/Drupal/Core/Utility/LinkGenerator.php
@@ -85,7 +85,7 @@ public function generateFromUrl($text, Url $url) {
     }
 
     // Set the "active" class if the 'set_active_class' option is not empty.
-    if (!empty($variables['options']['set_active_class'])) {
+    if (!empty($variables['options']['set_active_class']) && !$url->isExternal()) {
       // Add a "data-drupal-link-query" attribute to let the
       // drupal.active-link library know the query in a standardized manner.
       if (!empty($variables['options']['query'])) {
diff --git a/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php b/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php
index 55f4339..f81e689 100644
--- a/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php
@@ -131,7 +131,7 @@ public function testGenerateFromUrl() {
       ->with('test_route_1', array(), array('fragment' => 'the-fragment') + $this->defaultOptions)
       ->will($this->returnValue('/test-route-1#the-fragment'));
 
-    $this->moduleHandler->expects($this->once())
+    $this->moduleHandler->expects($this->exactly(2))
       ->method('alter')
       ->with('link', $this->isType('array'));
 
@@ -146,6 +146,24 @@ public function testGenerateFromUrl() {
       ),
       'content' => 'Test',
     ), $result);
+
+    $this->urlGenerator->expects($this->once())
+      ->method('generateFromPath')
+      ->with('http://drupal.org', array('external' => TRUE, 'set_active_class' => TRUE) + $this->defaultOptions)
+      ->will($this->returnValue('http://drupal.org'));
+
+    $url = Url::createFromPath('http://drupal.org');
+    $url->setUrlGenerator($this->urlGenerator);
+    $url->setOption('set_active_class', TRUE);
+
+    $result = $this->linkGenerator->generateFromUrl('Drupal', $url);
+    $this->assertTag(array(
+      'tag' => 'a',
+      'attributes' => array(
+        'href' => 'http://drupal.org',
+      ),
+      'content' => 'Drupal',
+    ), $result);
   }
 
   /**
