Skip to:
Content

BuddyPress.org

Changeset 7443


Ignore:
Timestamp:
10/17/2013 10:27:57 PM (12 years ago)
Author:
r-a-y
Message:

JS: Replace String.trim() method with jQuery's trim() function.

When using IE8 and when attempting to post an activity update, IE8
will throw an error and not post the update because of the usage of
String.trim(), which does not exist in IE8.

To fix this bug, we replace String.trim() with jQuery's version of
trim().

Props tomdxw for reporting the bug.

Fixes #5205.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/js/buddypress.js

    r7431 r7443  
    15551555        var cookie    = allCookies[i];
    15561556        var delimiter = cookie.indexOf("=");
    1557         var name      = unescape( cookie.slice(0, delimiter) ).trim();
     1557        var name      = jq.trim( unescape( cookie.slice(0, delimiter) ) );
    15581558        var value     = unescape( cookie.slice(delimiter + 1) );
    15591559
  • trunk/bp-themes/bp-default/_inc/global.js

    r7431 r7443  
    15341534        var cookie    = allCookies[i];
    15351535        var delimiter = cookie.indexOf("=");
    1536         var name      = unescape( cookie.slice(0, delimiter) ).trim();
     1536        var name      = jq.trim( unescape( cookie.slice(0, delimiter) ) );
    15371537        var value     = unescape( cookie.slice(delimiter + 1) );
    15381538
Note: See TracChangeset for help on using the changeset viewer.