Fix posting unicode characters to scuttle

This commit is contained in:
Tom Willemse 2015-01-20 14:25:16 +01:00
parent fac5beab6b
commit 4a1f8b915c

View file

@ -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(
@ -90,20 +94,26 @@ interactive("scuttle-post-link",
load_spec(encodeURIComponent(bo)));
check_buffer(I.buffer, content_buffer);
let postlinkurl = 'https://ryuslash.org/scuttle/api/posts_add.php?&url=' +
mylink +
'&description=' +
encodeURIComponent(
yield I.minibuffer.read(
$prompt = "name (required): ",
$initial_value = bo.textContent)) +
'&tags=' +
encodeURIComponent(
yield I.minibuffer.read(
$prompt = "tags (space delimited): ")) +
'&extended=' +
encodeURIComponent(
yield I.minibuffer.read(
$prompt = "extended description: "));
mylink +
'&description=' +
escape((
yield I.minibuffer.read(
$prompt = "name (required): ",
$initial_value = bo.textContent
)
)) +
'&tags=' +
escape((
yield I.minibuffer.read(
$prompt = "tags (space delimited): "
)
)) +
'&extended=' +
escape((
yield I.minibuffer.read(
$prompt = "extended description: "
)
));
try {
var content = yield send_http_request(