diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php
index 25daa42..8e42b4e 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php
@@ -9,6 +9,9 @@
 
 use Drupal\Component\Annotation\Plugin;
 use Drupal\Core\Annotation\Translation;
+use Drupal\Core\Path\AliasManagerInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\HttpFoundation\Request;
 
 /**
  * Default argument plugin to use the raw value from the URL.
@@ -22,6 +25,55 @@
  */
 class Raw extends ArgumentDefaultPluginBase {
 
+  /**
+   * The request object.
+   *
+   * @var \Symfony\Component\HttpFoundation\Request
+   */
+  protected $request;
+
+  /**
+   * The alias manager.
+   *
+   * @var \Drupal\Core\Path\AliasManagerInterface
+   */
+  protected $aliasManager;
+
+  /**
+   * Constructs a Raw object.
+   *
+   * @param array $configuration
+   *   A configuration array containing information about the plugin instance.
+   * @param string $plugin_id
+   *   The plugin_id for the plugin instance.
+   * @param array $plugin_definition
+   *   The plugin implementation definition.
+   * @param \Symfony\Component\HttpFoundation\Request $request
+   *   The request object.
+   * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
+   *   The alias manager.
+   */
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, Request $request, AliasManagerInterface $alias_manager) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition);
+
+    $this->request = $request;
+    $this->aliasManager = $alias_manager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) {
+    return new static(
+      $configuration,
+      $plugin_id,
+      $plugin_definition,
+      $container->get('request'),
+      $container->get('path.alias_manager.cached'
+      )
+    );
+  }
+
   protected function defineOptions() {
     $options = parent::defineOptions();
     $options['index'] = array('default' => '');
@@ -50,12 +102,13 @@ public function buildOptionsForm(&$form, &$form_state) {
   }
 
   public function getArgument() {
-    $path = NULL;
+    $path = $this->request->attributes->get('system_path');
     if ($this->options['use_alias']) {
-      $path = drupal_get_path_alias();
+      $path = $this->aliasManager->getPathAlias($path);
     }
-    if ($arg = arg($this->options['index'], $path)) {
-      return $arg;
+    $args = explode('/', $path);
+    if (isset($args[$this->options['index']])) {
+      return $args[$this->options['index']];
     }
   }
 
diff --git a/core/modules/views/tests/Drupal/views/Tests/Plugin/argument_default/RawTest.php b/core/modules/views/tests/Drupal/views/Tests/Plugin/argument_default/RawTest.php
new file mode 100644
index 0000000..f866575
--- /dev/null
+++ b/core/modules/views/tests/Drupal/views/Tests/Plugin/argument_default/RawTest.php
@@ -0,0 +1,89 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\views\Tests\Plugin\argument_default\RawTest.
+ */
+
+namespace Drupal\views\Tests\Plugin\argument_default;
+
+use Drupal\Tests\UnitTestCase;
+use Drupal\views\Plugin\views\argument_default\Raw;
+use Symfony\Component\HttpFoundation\Request;
+
+/**
+ * Tests the raw argument default plugin.
+ *
+ * @see \Drupal\views\Plugin\views\argument_default\Raw
+ */
+class RawTest extends UnitTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Argument default: Raw',
+      'description' => 'Tests the raw argument default plugin.',
+      'group' => 'Views Plugin',
+    );
+  }
+
+  /**
+   * Test the getArgument() method.
+   *
+   * @see \Drupal\views\Plugin\views\argument_default\Raw::getArgument()
+   */
+  public function testGetArgument() {
+    $view = $this->getMockBuilder('Drupal\views\ViewExecutable')
+      ->disableOriginalConstructor()
+      ->getMock();
+    $display_plugin = $this->getMockBuilder('Drupal\views\Plugin\views\display\DisplayPluginBase')
+      ->disableOriginalConstructor()
+      ->getMock();
+
+    $request = new Request(array(), array(), array('system_path' => 'test/example'));
+    $alias_manager = $this->getMock('Drupal\Core\Path\AliasManagerInterface');
+    $alias_manager->expects($this->never())
+      ->method('getPathAlias');
+
+    // Don't use aliases.
+    $raw = new Raw(array(), 'raw', array(), $request, $alias_manager);
+    $options = array(
+      'use_alias' => FALSE,
+      'index' => 0,
+    );
+    $raw->init($view, $display_plugin, $options);
+    $this->assertEquals('test', $raw->getArgument());
+
+    $raw = new Raw(array(), 'raw', array(), $request, $alias_manager);
+    $options = array(
+      'use_alias' => FALSE,
+      'index' => 1,
+    );
+    $raw->init($view, $display_plugin, $options);
+    $this->assertEquals('example', $raw->getArgument());
+
+    // Setup an alias manager with a path alias.
+    $alias_manager = $this->getMock('Drupal\Core\Path\AliasManagerInterface');
+    $alias_manager->expects($this->any())
+      ->method('getPathAlias')
+      ->with($this->equalTo('test/example'))
+      ->will($this->returnValue('other/example'));
+
+    $raw = new Raw(array(), 'raw', array(), $request, $alias_manager);
+    $options = array(
+      'use_alias' => TRUE,
+      'index' => 0,
+    );
+    $raw->init($view, $display_plugin, $options);
+    $this->assertEquals('other', $raw->getArgument());
+
+    $raw = new Raw(array(), 'raw', array(), $request, $alias_manager);
+    $options = array(
+      'use_alias' => TRUE,
+      'index' => 1,
+    );
+    $raw->init($view, $display_plugin, $options);
+    $this->assertEquals('example', $raw->getArgument());
+
+  }
+
+}
