Document using String.uri_encode()
with OS.shell_open()
This commit is contained in:
parent
31eccb5501
commit
81ac3c3e71
@ -634,6 +634,7 @@
|
|||||||
- [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
|
- [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website.
|
||||||
- [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The [code]mailto[/code] URL scheme[/url] for a list of fields that can be added.
|
- [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The [code]mailto[/code] URL scheme[/url] for a list of fields that can be added.
|
||||||
Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method.
|
Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method.
|
||||||
|
[b]Note:[/b] Use [method String.uri_encode] to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, [method shell_open] may not work correctly in a project exported to the Web platform.
|
||||||
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS and Windows.
|
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS and Windows.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
@ -970,7 +970,7 @@
|
|||||||
<method name="uri_decode" qualifiers="const">
|
<method name="uri_decode" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request.
|
Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also [method uri_encode].
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs"
|
var url = "$DOCS_URL/?highlight=Godot%20Engine%3%docs"
|
||||||
@ -986,7 +986,7 @@
|
|||||||
<method name="uri_encode" qualifiers="const">
|
<method name="uri_encode" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request.
|
Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also [method uri_decode].
|
||||||
[codeblocks]
|
[codeblocks]
|
||||||
[gdscript]
|
[gdscript]
|
||||||
var prefix = "$DOCS_URL/?highlight="
|
var prefix = "$DOCS_URL/?highlight="
|
||||||
|
Loading…
Reference in New Issue
Block a user