Verified Commit 5cf03b24 authored by Andrei Mateescu's avatar Andrei Mateescu
Browse files

task: #3568492 Remove IE support from Drupal.url.toAbsolute()

By: longwave
By: adhershmnair
By: smustgrave
(cherry picked from commit 138129b6)
parent 1031e2c5
Loading
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -407,15 +407,6 @@ window.Drupal = { behaviors: {}, locale: {} };
   */
  Drupal.url.toAbsolute = function (url) {
    const urlParsingNode = document.createElement('a');

    // Decode the URL first; this is required by IE <= 6. Decoding non-UTF-8
    // strings may throw an exception.
    try {
      url = decodeURIComponent(url);
    } catch (e) {
      // Empty.
    }

    urlParsingNode.setAttribute('href', url);

    return urlParsingNode.href;