diff --git a/README.md b/README.md index ec3673e..44c52b6 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ To Solve this issue, follow these steps: brew install php ``` -3. Head to setting page of this Alfred workflow, double-click on encode / decode block, and change `php` to `/usr/local/bin/php`. +3. Head to setting page of this Alfred workflow, double-click on encode / decode block, and change `php` to `/usr/local/bin/php`, or `/opt/homebrew/bin/php`(if install php by Homebrew). ## Updating Run the [Alleyoop Workflow](http://www.alfredforum.com/topic/1582-alleyoop-update-alfred-workflows/) using the keyword `oop`. If you're not comfortable with Alleyoop, **star & watch this repo** to keep up to date on new versions and additional workflows. diff --git a/current-version.json b/current-version.json index 93b0e05..d2cd652 100644 --- a/current-version.json +++ b/current-version.json @@ -1,5 +1,5 @@ { - "version": 1.8, + "version": 1.9, "download_url": "https://raw.github.com/willfarrell/alfred-encode-decode-workflow/master/encode-decode.alfredworkflow", "description": "Encode/Decode Strings" } \ No newline at end of file diff --git a/encode-decode.alfredworkflow b/encode-decode.alfredworkflow index 8ae44af..bdab34e 100644 Binary files a/encode-decode.alfredworkflow and b/encode-decode.alfredworkflow differ diff --git a/src/encode.php b/src/encode.php index dbb2854..2cd0de1 100644 --- a/src/encode.php +++ b/src/encode.php @@ -82,7 +82,7 @@ function prepare_output($items) { $encodes = array(); // url -$url_encode = urlencode($query); +$url_encode = urlencode(stripslashes($query)); if ($url_encode != $query) $encodes["URL Encoded"] = $url_encode; // HTML diff --git a/src/update.json b/src/update.json index ccd5251..f76063e 100644 --- a/src/update.json +++ b/src/update.json @@ -1,4 +1,4 @@ { - "version": 1.8, + "version": 1.9, "remote_json": "https://raw.github.com/willfarrell/alfred-encode-decode-workflow/master/current-version.json" } \ No newline at end of file diff --git a/src/workflows.php b/src/workflows.php index caa7c63..dead388 100644 --- a/src/workflows.php +++ b/src/workflows.php @@ -194,7 +194,9 @@ public function toxml( $a=null, $format='array' ) { $c->addAttribute( 'valid', $b[$key] ); endif; elseif ( $key == 'autocomplete' ): - $c->addAttribute( 'autocomplete', $b[$key] ); + if ($b[$key]): + $c->addAttribute( 'autocomplete', $b[$key] ); + endif; elseif ( $key == 'icon' ): if ( substr( $b[$key], 0, 9 ) == 'fileicon:' ): $val = substr( $b[$key], 9 );