Commit 2b8919db authored by JC Brand's avatar JC Brand

Fixes #774

parent 3d9e4780
# Changelog
## 2.0.6 (Unreleased)
- Escape user-generated input to prevent JS-injection attacks. (Thanks to SamWhited) [jcbrand]
- #486 Honor existing mam user configuration [throwaway42]
- #749 /me will show your contact's name in the sent field [jcbrand]
- Escape user-generated input to prevent JS-injection attacks. (Thanks to SamWhited) [jcbrand]
- #774 Browser language (fr-fr or fr) is not detected by default [jcbrand]
## 2.0.5 (2017-02-01)
- #743, #751, #753 Update to Strophe 1.2.12. SASL-EXTERNAL now has reduced priority, so it won't
......
......@@ -11,6 +11,7 @@
"jquery",
"underscore",
"polyfill",
"locales",
"utils",
"moment_with_locales",
"strophe",
......@@ -19,7 +20,7 @@
"backbone.browserStorage",
"backbone.overview",
], factory);
}(this, function ($, _, dummy, utils, moment, Strophe, pluggable) {
}(this, function ($, _, dummy, locales, utils, moment, Strophe, pluggable) {
/*
* Cannot use this due to Safari bug.
* See https://github.com/jcbrand/converse.js/issues/196
......@@ -190,8 +191,10 @@
// Detect support for the user's locale
// ------------------------------------
var locales = typeof locales === "undefined" ? {} : locales;
this.isConverseLocale = function (locale) { return typeof locales[locale] !== "undefined"; };
locales = _.isUndefined(locales) ? {} : locales;
this.isConverseLocale = function (locale) {
return !_.isUndefined(locales[locale]);
};
this.isMomentLocale = function (locale) { return moment.locale() !== moment.locale(locale); };
if (!moment.locale) { //moment.lang is deprecated after 2.8.1, use moment.locale instead
moment.locale = moment.lang;
......
......@@ -8,16 +8,14 @@ if (typeof define !== 'undefined') {
/* When running tests, define is not defined. */
define("converse", [
"converse-api",
// PLEASE NOTE: By default all translations are included.
// You can modify the file src/locales.js to include only those
// translations that you care about.
/* START: Removable components
* --------------------
* Any of the following components may be removed if they're not needed.
*/
"locales", // Translations for converse.js. This line can be removed
// to remove *all* translations, or you can modify the
// file src/locales.js to include only those
// translations that you care about.
"converse-chatview", // Renders standalone chat boxes for single user chat
"converse-controlbox", // The control box
"converse-bookmarks", // XEP-0048 Bookmarks
......
......@@ -208,7 +208,6 @@
locale = utils.isLocaleAvailable(window.navigator.systemLanguage, library_check);
}
return locale || 'en';
},
fadeIn: function (el, callback) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment