Fix case where str is not present

This commit is contained in:
bfederle 2012-03-14 11:51:04 -07:00
parent a1e85cdd6d
commit c5e726be90

View File

@ -61,6 +61,8 @@
* Strip unwanted characters from user-based input
*/
cloudStack.sanitize = window._s = function(str) {
if (!str) return '';
var sanitized = str
.replace(/&/g, "&")
.replace(/</g, "&lt;")