Make sure the display name is displayed in the same way everywhere

pull/1/head
yflory 8 years ago
parent 2c5c6da0d9
commit 11d54256da

@ -1940,7 +1940,7 @@ define([
var setName = APP.setName = function (newName) { var setName = APP.setName = function (newName) {
if (typeof(newName) !== 'string') { return; } if (typeof(newName) !== 'string') { return; }
var myUserNameTemp = Cryptpad.fixHTML(newName.trim()); var myUserNameTemp = newName.trim();
if(myUserNameTemp.length > 32) { if(myUserNameTemp.length > 32) {
myUserNameTemp = myUserNameTemp.substr(0, 32); myUserNameTemp = myUserNameTemp.substr(0, 32);
} }

@ -293,7 +293,7 @@ define([
var setName = module.setName = function (newName) { var setName = module.setName = function (newName) {
if (typeof(newName) !== 'string') { return; } if (typeof(newName) !== 'string') { return; }
var myUserNameTemp = Cryptpad.fixHTML(newName.trim()); var myUserNameTemp = newName.trim();
if(myUserNameTemp.length > 32) { if(myUserNameTemp.length > 32) {
myUserNameTemp = myUserNameTemp.substr(0, 32); myUserNameTemp = myUserNameTemp.substr(0, 32);
} }
@ -528,7 +528,7 @@ define([
Dom = Dom || (new DOMParser()).parseFromString(data,"text/html"); Dom = Dom || (new DOMParser()).parseFromString(data,"text/html");
return ('<!DOCTYPE html>\n' + return ('<!DOCTYPE html>\n' +
'<html>\n' + '<html>\n' +
(typeof(Hyperjson.toString) === 'function'? (typeof(Hyperjson.toString) === 'function' ?
Hyperjson.toString(Hyperjson.fromDOM(Dom.body)): Hyperjson.toString(Hyperjson.fromDOM(Dom.body)):
Dom.head.outerHTML) + '\n'); Dom.head.outerHTML) + '\n');
}; };

@ -440,7 +440,7 @@ define([
var setName = APP.setName = function (newName) { var setName = APP.setName = function (newName) {
if (typeof(newName) !== 'string') { return; } if (typeof(newName) !== 'string') { return; }
var myUserNameTemp = Cryptpad.fixHTML(newName.trim()); var myUserNameTemp = newName.trim();
if(myUserNameTemp.length > 32) { if(myUserNameTemp.length > 32) {
myUserNameTemp = myUserNameTemp.substr(0, 32); myUserNameTemp = myUserNameTemp.substr(0, 32);
} }

Loading…
Cancel
Save