Commit 0d4890f6 authored by Boris Kocherov's avatar Boris Kocherov

fix: use ecodeUri for $ref

parent 3773f8e2
......@@ -192,7 +192,7 @@
if (!path) {
path = "/";
}
url = convertUrlToAbsolute(g, path, $ref, window.location);
url = convertUrlToAbsolute(g, path, decodeURI($ref), window.location);
download_url = url.origin + url.pathname + url.search;
mapped_schema = g.props.schemas[download_url];
if (typeof mapped_schema === "string") {
......@@ -201,7 +201,7 @@
protocol = url.protocol;
if (protocol === "http:" || protocol === "https:") {
if (window.location.protocol !== protocol) {
url = new URL($ref.replace(protocol + "//", window.location.protocol + "//"));
url = new URL(decodeURI($ref).replace(protocol + "//", window.location.protocol + "//"));
// throw new Error("You cannot mixed http and https calls");
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment