Note: This API has been deprecated in jQuery 3.5; please use the native String.prototype.trim method instead. Unlike jQuery.trim, String.prototype.trim does not work with types other than strings (null, undefined, Number). Make sure that your code is compatible when migrating.
https://api.jquery.com/jQuery.trim/
https://github.com/backdrop-contrib/flag/blob/1.x-1.x/js/flag.js#L203