Permalink
Browse files

text is optional argument for fontapiurlbuilder

  • Loading branch information...
1 parent dda8b7b commit 8ba0556922f31718ce1b8ed094fd52beb324ca37 Vitaly Volkov committed Dec 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/google/fontapiurlbuilder.js
@@ -9,7 +9,7 @@ webfont.FontApiUrlBuilder = function(apiUrl, protocol, text) {
}
this.fontFamilies_ = [];
this.subsets_ = [];
- this.text_ = text;
+ this.text_ = text || '';
};
@@ -65,7 +65,7 @@ webfont.FontApiUrlBuilder.prototype.build = function() {
}
if (this.text_.length > 0) {
- url += '&text=' + this.webSafe(this.text_);
+ url += '&text=' + escape(this.webSafe(this.text_));
}
return url;

0 comments on commit 8ba0556

Please sign in to comment.