Fix posting unicode characters to scuttle
This commit is contained in:
parent
fac5beab6b
commit
4a1f8b915c
1 changed files with 33 additions and 23 deletions
|
@ -52,22 +52,26 @@ interactive("scuttle-post",
|
|||
function (I) {
|
||||
check_buffer(I.buffer, content_buffer);
|
||||
let posturl = 'https://ryuslash.org/scuttle/api/posts_add.php?&url=' +
|
||||
encodeURIComponent(
|
||||
load_spec_uri_string(
|
||||
load_spec(I.buffer.top_frame))) +
|
||||
escape(load_spec_uri_string(load_spec(I.buffer.top_frame))) +
|
||||
'&description=' +
|
||||
encodeURIComponent(
|
||||
escape((
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "name (required): ",
|
||||
$initial_value = I.buffer.title)) +
|
||||
$initial_value = I.buffer.title
|
||||
)
|
||||
)) +
|
||||
'&tags=' +
|
||||
encodeURIComponent(
|
||||
escape((
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "tags (space delimited): ")) +
|
||||
$prompt = "tags (space delimited): "
|
||||
)
|
||||
)) +
|
||||
'&extended=' +
|
||||
encodeURIComponent(
|
||||
escape((
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "extended description: "));
|
||||
$prompt = "extended description: "
|
||||
)
|
||||
));
|
||||
|
||||
try {
|
||||
var content = yield send_http_request(
|
||||
|
@ -92,18 +96,24 @@ interactive("scuttle-post-link",
|
|||
let postlinkurl = 'https://ryuslash.org/scuttle/api/posts_add.php?&url=' +
|
||||
mylink +
|
||||
'&description=' +
|
||||
encodeURIComponent(
|
||||
escape((
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "name (required): ",
|
||||
$initial_value = bo.textContent)) +
|
||||
$initial_value = bo.textContent
|
||||
)
|
||||
)) +
|
||||
'&tags=' +
|
||||
encodeURIComponent(
|
||||
escape((
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "tags (space delimited): ")) +
|
||||
$prompt = "tags (space delimited): "
|
||||
)
|
||||
)) +
|
||||
'&extended=' +
|
||||
encodeURIComponent(
|
||||
escape((
|
||||
yield I.minibuffer.read(
|
||||
$prompt = "extended description: "));
|
||||
$prompt = "extended description: "
|
||||
)
|
||||
));
|
||||
|
||||
try {
|
||||
var content = yield send_http_request(
|
||||
|
|
Loading…
Reference in a new issue