Skip to content

Commit c5e726b

Browse files
committed
Fix case where str is not present
1 parent a1e85cd commit c5e726b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎ui/scripts/ui/utils.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
* Strip unwanted characters from user-based input
6262
*/
6363
cloudStack.sanitize = window._s = function(str) {
64+
if (!str) return '';
65+
6466
var sanitized = str
6567
.replace(/&/g, "&")
6668
.replace(/</g, "&lt;")

0 commit comments

Comments
 (0)