Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Force title to string #19

Merged
merged 2 commits into from

2 participants

@joshvermaire

Growl was silently throwing an exception when receiving an unexpected token, e.g. '('. Test case:

growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' })
@tj tj merged commit 281aeb7 into from
@tj
Owner
tj commented

this should be the case for the others as well but we can patch that separately i guess

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 5, 2012
  1. @joshvermaire

    escape title

    joshvermaire authored
  2. @joshvermaire

    add test case

    joshvermaire authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +1 −1  lib/growl.js
  2. +1 −0  test.js
View
2  lib/growl.js
@@ -166,7 +166,7 @@ function growl(msg, options, fn) {
case 'Darwin':
args.push(cmd.msg);
args.push('"' + msg + '"');
- if (options.title) args.push(options.title);
+ if (options.title) args.push('"' + options.title + '"');
break;
case 'Linux':
if (options.title) {
View
1  test.js
@@ -14,3 +14,4 @@ growl('Show pdf filesystem icon', { image: 'article.pdf' })
growl('Show pdf filesystem icon', { image: 'article.pdf' }, function(){
console.log('callback');
})
+growl('Show pdf filesystem icon', { title: 'Use show()', image: 'article.pdf' })
Something went wrong with that request. Please try again.