Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

angular-resource breaks IPv6 URLs #12512

Closed
@c2franz

Description

@c2franz

There is a regular expression in angular-resource.js that is breaking IPv6 resource URLs:

url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
    leadingSlashes, tail) {
  if (tail.charAt(0) == '/') {
    return tail;
  } else {
    return leadingSlashes + tail;
  }
});

Example:
http://jsfiddle.net/c2franz/pszLs0kg/4/

Expected behavior: a GET request is performed to http://[2620:0:861:ed1a::1]
Observed behavior: a GET request is performed to http://[2620:0:861::1]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions