From ab95c86c0a1bf42e2c7222d3f6abf532b4d42670 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Fri, 28 Feb 2014 18:40:58 +0400 Subject: [PATCH] fix escaping of % in windows --- twisterpost.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twisterpost.php b/twisterpost.php index 422e3e5..02e6c05 100644 --- a/twisterpost.php +++ b/twisterpost.php @@ -97,7 +97,7 @@ class TwisterPost } $k = $this->maxId + 1; - $text = '"' . str_replace('"', '\\"', $text) . '"'; + $text = escapeshellarg($text); $result = $this->runRpcCommand('newpostmsg', "{$this->user} $k $text"); if (isset($result->code) && $result->code < 0) { $this->maxId = -1;