diff options
-rw-r--r-- | scripts/run.php | 2 | ||||
-rw-r--r-- | src/Etym.php | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/run.php b/scripts/run.php index b50bcc7..59af4be 100644 --- a/scripts/run.php +++ b/scripts/run.php @@ -6,7 +6,7 @@ use App\Etym; $baseURL = "http://www.etymonline.com/word/"; $htmlNode = "section[class^='word__defination']"; -$pasteCmd = "pastebinit -b http://p.of.je 2>/dev/null"; +$pasteCmd = "../pastebinit -b http://p.of.je"; $etym = new Etym($baseURL, $htmlNode, $pasteCmd); $result = $etym->getDefinition(); diff --git a/src/Etym.php b/src/Etym.php index 10e22d7..8be0a99 100644 --- a/src/Etym.php +++ b/src/Etym.php @@ -121,8 +121,9 @@ class Etym if (strlen($truncated) >= $MAX_CHARACTERS) { // Create that povjee link. // Capitalise the first char of the input. - $input = ucfirst($input); + $input = ucfirst($input); $defAndUrl = "\"$input\"" . "\n\n" . $definition . "\n\n" . "[Original at: $url]"; + $safeDef = escapeshellarg($defAndUrl); $pasteBinCmd = "echo $safeDef | " . $this->pasteCmd; |