Skip to content

Commit d86c97b

Browse files
S-H-GAMELINKSmame
authored andcommitted
Use CGI.escapeURIComponent and CGI.unescapeURIComponent for compatibility
1 parent 022ff24 commit d86c97b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/typeprof/lsp/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ def initialize(core_options, reader, writer, url_schema: nil, publish_all_diagno
6767

6868
#: (String) -> String
6969
def path_to_uri(path)
70-
@url_schema + File.expand_path(path).split("/").map {|s| CGI.escape_uri_component(s) }.join("/")
70+
@url_schema + File.expand_path(path).split("/").map {|s| CGI.escapeURIComponent(s) }.join("/")
7171
end
7272

7373
def uri_to_path(uri)
74-
uri.delete_prefix(@url_schema).split("/").map {|s| CGI.unescape_uri_component(s) }.join("/")
74+
uri.delete_prefix(@url_schema).split("/").map {|s| CGI.unescapeURIComponent(s) }.join("/")
7575
end
7676

7777
#: (Array[String]) -> void

0 commit comments

Comments
 (0)