A common software development pattern is to have the same data replicated across different environments, such as production and staging. This happens i.e. in Odoo.sh.
Let's assume your production instance is in ``https://www.example.com`` and your staging one is in ``https://staging.example.com``. Then:
1. A user in production modifies a website menu and makes it link to ``https://www.example.com/my-cool-page``.
1. A new change lands in staging, with a fresh copy of the production database.
1. The user goes to ``https://staging.example.com`` and navigates through the menus to validate the changes.
1. While navigating, he clicks in the website menu that links to ``https://www.example.com/my-cool-page``.
1. He makes some changes. **He didn't realize he was modifying production**.
To avoid this kind of problems, if a user pastes a link that starts with the current domain, it gets removed.
closesodoo/odoo#35715
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>