Rodolpho Lima 4da0608f7c [IMP] web_editor: remove global flag from URL regex
A Regex object with the 'g' flag is stateful [1]. As the URL_REGEX and
URL_REGEX_WITH_INFOS objects are exported, code that calls  their `exec`
method would be changing their `lastIndex` property, affecting future
`exec` calls in different code sections.

This commit removes the 'g' flag from the URL regexes, in order to allow
us to:
- avoid side effects of one call to `exec` to subsequent calls,
- remove the `getUrlsInfosInString` utility function,
- use `match` instead of `exec` for having results containing the
  capturing groups (see [2]).

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex#avoiding_side_effects
[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match#return_value

task-3520513

Part-of: odoo/odoo#136497
2023-10-03 19:20:09 +00:00
2023-10-03 19:19:57 +00:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%