Repository: syncthing/syncthing
File: gui/default/syncthing/core/syncthingController.js (JavaScript)

Code before:
                    body += $scope.currentDevice.deviceID;
                    body += '\r\n\r\n';
                    body += $translate.instant("Syncthing is a continuous file synchronization program. It synchronizes files between two or more computers in real time, safely protected from prying eyes. Your data is your data alone and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.");
                    body += '\r\n\r\n';
                    body += footer;
                    try {
                        location.href = 'mailto:?subject=' + encodeURIComponent(subject) + '&body=' + encodeURIComponent(body);
                        success = true;
                    }
                    catch (ex) {
                        var error = $translate.instant("No email client found. Do you want to copy the email text to clipboard instead?");
                        if (confirm(error)) {
                              $scope.copyToClipboard(onclick, body);
                        }
                    }
                    break;
                case 'sms':
                    // SMS is limited to 160 characters (non-Unicode), so we keep
                    // it as short as possible, e.g. by stripping hyphens from
                    // device ID. The current minimum length is around 150 chars,
                    // but some room is required for longer sharing device names.
                    var body = title;
                    body += '\r\n\r\n';
                    body += $scope.currentDevice.deviceID.replace(/-/g, '');
                    body += '\r\n\r\n';
                    body += footer;
                    try {
                        location.href = 'sms://;?&body=' + encodeURIComponent(body);
                        success = true;
                    }
                    catch (ex) {
                        var error = $translate.instant("No SMS client found. Do you want to copy the SMS text to clipboard instead?");
                        if (confirm(error)) {
                              $scope.copyToClipboard(onclick, body);
                        }
                    }
                    break;
            }
        }
    })
    .directive('shareTemplate', function () {
        return {
            templateUrl: 'syncthing/core/editShareTemplate.html',
            scope: {
                selected: '=',
                encryptionPasswords: '=',
                id: '@',
                label: '@',
                folderType: '@',
                untrusted: '=',
            },

Review comment (suggestion):
```suggestion
                    var body = [
                        title,
                        $scope.currentDevice.deviceID.replace(/-/g, ''),
                        footer].join('\n');
```

Code after:
                initController();
            }
        };

        $scope.toggleUnits = function () {
            $scope.metricRates = !$scope.metricRates;
            try {
                window.localStorage["metricRates"] = $scope.metricRates;
            } catch (exception) { }
        };

        $scope.sizeOf = function (dict) {
            if (dict === undefined) {
                return 0;
            }
            return Object.keys(dict).length;
        };

        $scope.has = function (array, element) {
            return array.indexOf(element) >= 0;
        };

        $scope.dismissNotification = function (id) {
            var idx = $scope.config.options.unackedNotificationIDs.indexOf(id);
            if (idx > -1) {
                $scope.config.options.unackedNotificationIDs.splice(idx, 1);
                $scope.saveConfig();
            }
        };

        $scope.abbreviatedError = function (addr) {
            var status = $scope.system.lastDialStatus[addr];
            if (!status || !status.error) {
                return null;
            }
            var time = $filter('date')(status.when, "HH:mm:ss")
            var err = status.error.replace(/.+: /, '');
            return err + " (" + time + ")";
        };

        $scope.setCrashReportingEnabled = function (enabled) {
            $scope.config.options.crashReportingEnabled = enabled;
            $scope.saveConfig();
        };

        $scope.isUnixAddress = function (address) {
            return address != null &&
                (address.indexOf('/') == 0 ||
                    address.indexOf('unix://') == 0 ||
                    address.indexOf('unixs://') == 0);
        };