Skip to content
Snippets Groups Projects
Commit 34b35c56 authored by Pierre-Yves Dufays's avatar Pierre-Yves Dufays
Browse files

[FIX] note: support link in note created from the systray


The URLs in notes created from the systray were not transformed into links.
This solves the problem.

Task-3052952

closes odoo/odoo#105990

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 20b8453f
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ var core = require('web.core');
var datepicker = require('web.datepicker');
var _t = core._t;
const urlRegExp = /http(s)?:\/\/(www\.)?[a-zA-Z0-9@:%_+~#=~#?&/=\-;!.]{3,2000}/g;
ActivityMenu.include({
events: _.extend({}, ActivityMenu.prototype.events, {
......@@ -41,7 +42,7 @@ ActivityMenu.include({
* @private
*/
_saveNote: function () {
var note = this.$('.o_note_input').val().trim();
var note = this.$('.o_note_input').val().replace(urlRegExp, '<a href="$&">$&</a>').trim();
if (! note) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment