diff --git a/src/Tests/XmlRpcBasicTest.php b/src/Tests/XmlRpcBasicTest.php
index 7265b6b..19595d1 100644
--- a/src/Tests/XmlRpcBasicTest.php
+++ b/src/Tests/XmlRpcBasicTest.php
@@ -115,7 +115,7 @@ class XmlRpcBasicTest extends XmlRpcTestBase {
    * @link http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
    */
   public function testInvalidServer() {
-    $invalid_endpoint = 'http://example.invalid/xmlrpc.php';
+    $invalid_endpoint = 'http://example.invalid/xmlrpc';
     $result = xmlrpc($invalid_endpoint, ['system.listMethods' => []]);
     $this->verboseResult($result);
     $this->assertFalse($result, "Calling an unknown host returns an error condition");
diff --git a/src/Tests/XmlRpcTestBase.php b/src/Tests/XmlRpcTestBase.php
index bbd9a4e..3683516 100644
--- a/src/Tests/XmlRpcTestBase.php
+++ b/src/Tests/XmlRpcTestBase.php
@@ -7,6 +7,7 @@
 namespace Drupal\xmlrpc\Tests;
 
 use Drupal\Component\Utility\SafeMarkup;
+use Drupal\Core\Url;
 use Drupal\simpletest\WebTestBase;
 use Symfony\Component\Routing\Generator\UrlGenerator;
 
@@ -56,7 +57,7 @@ abstract class XmlRpcTestBase extends WebTestBase {
    */
   protected function xmlRpcGet(array $args, array $headers = []) {
 
-    $url = \Drupal::url('xmlrpc', [], ['absolute' => TRUE]);
+    $url = Url::fromRoute('xmlrpc', [], ['absolute' => TRUE])->toString();
 
     $result = xmlrpc($url, $args, $headers);
     $this->verboseResult($result);
diff --git a/xmlrpc.inc b/xmlrpc.inc
index d37b38a..5abca8f 100644
--- a/xmlrpc.inc
+++ b/xmlrpc.inc
@@ -563,7 +563,7 @@ function xmlrpc_base64_get_xml($xmlrpc_base64) {
  * Performs one or more XML-RPC requests.
  *
  * @param string $url
- *   Absolute URL of the XML-RPC endpoint, e.g. http://example.com/xmlrpc.php .
+ *   Absolute URL of the XML-RPC endpoint, e.g. http://example.com/xmlrpc .
  * @param array $args
  *   An associative array whose keys are the methods to call and whose values
  *   are the arguments to pass to the respective method. If multiple methods
diff --git a/xmlrpc.module b/xmlrpc.module
index 8baaf31..6ef2be7 100644
--- a/xmlrpc.module
+++ b/xmlrpc.module
@@ -5,19 +5,20 @@
  * Enables XML-RPC functionality.
  */
 
-use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Url;
 
 /**
  * Implements hook_help().
  */
-function xmlrpc_help($route_name, RouteMatchInterface $route_match) {
+function xmlrpc_help($route_name) {
   switch ($route_name) {
     case 'help.page.xmlrpc':
       $output = '';
       $output .= '<h3>' . t('About') . '</h3>';
-      $output .= '<p>' . t('The XML-RPC module gives external systems the opportunity to communicate with the site through the <a href="http://en.wikipedia.org/wiki/XML-RPC">XML-RPC protocol</a>. An XML-RPC client can communicate with the site by making a request to <a href="!xrphp">xmlrpc.php</a>. For more information, see <a href="!xrdocs">the online documentation for the XML-RPC module</a>.', array(
-          '!xrphp' => \Drupal::url('xmlrpc.php'),
-          '!xrdocs' => 'https://drupal.org/documentation/modules/xmlrpc',
+      $output .= '<p>' . t('The XML-RPC module gives external systems the opportunity to communicate with the site through the <a href=":url_definition">XML-RPC protocol</a>. An XML-RPC client can communicate with the site by making a request to <a href=":url_endpoint">xmlrpc</a>. For more information, see <a href=":url_docs">the online documentation for the XML-RPC module</a>.', array(
+          ':url_definition' => 'https://en.wikipedia.org/wiki/XML-RPC',
+          ':url_endpoint' => Url::fromRoute('xmlrpc')->toString(),
+          ':url_docs' => 'https://drupal.org/documentation/modules/xmlrpc',
         )) . '</p>';
       return $output;
   }
@@ -28,7 +29,7 @@ function xmlrpc_help($route_name, RouteMatchInterface $route_match) {
  *
  * Usage example:
  * @code
- * $result = xmlrpc('http://example.com/xmlrpc.php', array(
+ * $result = xmlrpc('http://example.com/xmlrpc', array(
  *   'service.methodName' => array($parameter, $second, $third),
  * ));
  * @endcode
diff --git a/xmlrpc_example/src/Controller/XmlRpcExampleController.php b/xmlrpc_example/src/Controller/XmlRpcExampleController.php
index beea406..d171182 100644
--- a/xmlrpc_example/src/Controller/XmlRpcExampleController.php
+++ b/xmlrpc_example/src/Controller/XmlRpcExampleController.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\xmlrpc_example\Controller;
 
+use Drupal\Component\Utility\UrlHelper;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Url;
 use Drupal\xmlrpc_example\XmlRpcExampleTrait;
@@ -24,7 +25,7 @@ class XmlRpcExampleController extends ControllerBase {
    * Our router maps this method to the path 'examples/xmlrpc'.
    */
   public function info() {
-    // Make the xmlrpc request.
+    // Make the XML-RPC request.
     $server = $this->getEndpoint();
     $options = array('system.listMethods' => array());
     $supported_methods = xmlrpc($server, $options);
@@ -50,7 +51,9 @@ class XmlRpcExampleController extends ControllerBase {
       ],
       'method_array' => [
         '#theme' => 'item_list',
-        '#title' => $this->t('These methods are supported by !server', array('!server' => check_url($server))),
+        '#title' => $this->t('These methods are supported by :url', [
+          ':url' => UrlHelper::stripDangerousProtocols($server),
+        ]),
         '#list_type' => 'ul',
         '#items' => $supported_methods,
       ],
diff --git a/xmlrpc_example/src/Form/XmlRpcExampleAlterForm.php b/xmlrpc_example/src/Form/XmlRpcExampleAlterForm.php
index 9edf65e..624fdf9 100644
--- a/xmlrpc_example/src/Form/XmlRpcExampleAlterForm.php
+++ b/xmlrpc_example/src/Form/XmlRpcExampleAlterForm.php
@@ -14,6 +14,7 @@ namespace Drupal\xmlrpc_example\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Url;
 
 /**
  * Presents a form to enable/disable the code implemented in hook_xmlrpc_alter.
@@ -52,8 +53,8 @@ class XmlRpcExampleAlterForm extends ConfigFormBase {
       '#default_value' => $config->get('alter_enabled'),
     );
     $form['info'] = array(
-      '#markup' => '<div>' . $this->t('Use the <a href="!link">client submission form</a> to see the results of checking this checkbox', array(
-        '!link' => $this->url('xmlrpc_example.client'),
+      '#markup' => '<div>' . $this->t('Use the <a href=":url">client submission form</a> to see the results of checking this checkbox', array(
+        ':url' => Url::fromRoute('xmlrpc_example.client')->toString(),
       )) . '</div>',
     );
 
diff --git a/xmlrpc_example/src/Form/XmlRpcExampleClientForm.php b/xmlrpc_example/src/Form/XmlRpcExampleClientForm.php
index 30ac234..b362121 100644
--- a/xmlrpc_example/src/Form/XmlRpcExampleClientForm.php
+++ b/xmlrpc_example/src/Form/XmlRpcExampleClientForm.php
@@ -90,8 +90,8 @@ class XmlRpcExampleClientForm extends FormBase {
     if ($config->get('alter_enabled')) {
       $form['overridden'] = array(
         '#type' => 'markup',
-        '#markup' => '<div><strong>' . $this->t('Just a note of warning: The <a href="!link">alter form</a> has been used to disable the limits, so you may want to turn that off if you do not want it.', array(
-          '!link' => $this->url('xmlrpc_example.alter'),
+        '#markup' => '<div><strong>' . $this->t('Just a note of warning: The <a href=":url">alter form</a> has been used to disable the limits, so you may want to turn that off if you do not want it.', array(
+          ':url' => Url::fromRoute('xmlrpc_example.alter')->toString(),
         )) . '</strong></div>',
       );
     }
diff --git a/xmlrpc_example/src/Form/XmlRpcExampleServerForm.php b/xmlrpc_example/src/Form/XmlRpcExampleServerForm.php
index 1fa65ba..69475db 100644
--- a/xmlrpc_example/src/Form/XmlRpcExampleServerForm.php
+++ b/xmlrpc_example/src/Form/XmlRpcExampleServerForm.php
@@ -15,6 +15,7 @@ namespace Drupal\xmlrpc_example\Form;
 
 use Drupal\Core\Form\ConfigFormBase;
 use Drupal\Core\Form\FormStateInterface;
+use Drupal\Core\Url;
 
 
 /**
@@ -68,16 +69,16 @@ class XmlRpcExampleServerForm extends ConfigFormBase {
     );
     $form['info'] = array(
       '#type' => 'markup',
-      '#markup' => '<div>' . $this->t('Use the <a href="!link">XML-RPC Client example form</a> to experiment.', array(
-        '!link' => $this->url('xmlrpc_example.client'),
+      '#markup' => '<div>' . $this->t('Use the <a href=":url">XML-RPC Client example form</a> to experiment.', array(
+        ':url' => Url::fromRoute('xmlrpc_example.client')->toString(),
       )),
     );
 
     if ($config->get('alter_enabled')) {
       $form['overridden'] = array(
         '#type' => 'markup',
-        '#markup' => '<div><strong>' . $this->t('Just a note of warning: The <a href="!link">alter form</a> has been used to disable the limits, so you may want to turn that off if you do not want it.', array(
-          '!link' => $this->url('xmlrpc_example.alter'),
+        '#markup' => '<div><strong>' . $this->t('Just a note of warning: The <a href=":url">alter form</a> has been used to disable the limits, so you may want to turn that off if you do not want it.', array(
+          ':url' => Url::fromRoute('xmlrpc_example.alter')->toString(),
         )) . '</strong></div>',
       );
     }
