Reverting r2903, since it's not necessary, and, unless we decide to cast automatically in all the ZU functions, we should stay consistent
This commit is contained in:
parent
5a60ccc92a
commit
dd78c85d73
|
@ -156,16 +156,8 @@ Zotero.Utilities.prototype.cleanTags = function(x) {
|
||||||
* <ZOTEROHELLIP/> => …
|
* <ZOTEROHELLIP/> => …
|
||||||
*/
|
*/
|
||||||
Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
|
Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
|
||||||
switch (typeof str) {
|
if (typeof str != 'string') {
|
||||||
case 'string':
|
throw "Argument '" + str + "' must be a string in Zotero.Utilities.htmlSpecialChars()";
|
||||||
break;
|
|
||||||
|
|
||||||
case 'number':
|
|
||||||
str = str + '';
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw "Argument '" + str + "' must be a string in Zotero.Utilities.htmlSpecialChars()";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!str) {
|
if (!str) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user