Changeset 6449


Ignore:
Timestamp:
Apr 17, 2014, 12:55:30 PM (8 years ago)
Author:
Nicklas Nordborg
Message:

Check input value and return empty string in some cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/include/scripts/main-2.js

    r6428 r6449  
    26362636  strings.trim = function(value)
    26372637  {
     2638    if (!value) return '';
    26382639    value = value.replace(/^\s+/g, '');
    26392640    value = value.replace(/\s+$/g, '');
     
    26512652  strings.cut = function(value, maxLength)
    26522653  {
     2654    if (!value) return '';
    26532655    if (value.length > maxLength)
    26542656    {
     
    26652667  strings.encodeTags = function(value)
    26662668  {
     2669    if (!value) return '';
    26672670    var encoded = value;
    26682671    encoded = encoded.replace(/\&/g, '&');
Note: See TracChangeset for help on using the changeset viewer.