[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:
parent
66918d6e32
commit
758d467982
|
@ -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 "&"
|
||||
|
|
Loading…
Reference in New Issue