[FIX] In mail text2Html, replace url (http or ftp) before the replacement of return line, else some return line was sometimes considered as the link.

Eg : <a href="http://www.google.com<br/><br/>Puis">http://www.google.com<br/><br/><br/>Puis</a>

bzr revid: jke@openerp.com-20140318203051-lk92fjgwltkwbk68
This commit is contained in:
Kersten Jeremy 2014-03-18 21:30:51 +01:00
parent 66918d6e32
commit 758d467982
1 changed files with 1 additions and 1 deletions

View File

@ -76,8 +76,8 @@ openerp.mail = function (session) {
*/
get_text2html: function (text) {
return text
.replace(/[\n\r]/g,'<br/>')
.replace(/((?:https?|ftp):\/\/[\S]+)/g,'<a href="$1">$1</a> ')
.replace(/[\n\r]/g,'<br/>')
},
/* Returns the complete domain with "&"